1 /* |
1 /* |
2 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
107 } else if (caller == GSSCaller.CALLER_ACCEPT) { |
107 } else if (caller == GSSCaller.CALLER_ACCEPT) { |
108 alts = new String[] { |
108 alts = new String[] { |
109 "com.sun.security.jgss.krb5.accept", |
109 "com.sun.security.jgss.krb5.accept", |
110 "com.sun.security.jgss.accept", |
110 "com.sun.security.jgss.accept", |
111 }; |
111 }; |
112 } else if (caller == GSSCaller.CALLER_SSL_CLIENT) { |
|
113 alts = new String[] { |
|
114 "com.sun.security.jgss.krb5.initiate", |
|
115 "com.sun.net.ssl.client", |
|
116 }; |
|
117 } else if (caller == GSSCaller.CALLER_SSL_SERVER) { |
|
118 alts = new String[] { |
|
119 "com.sun.security.jgss.krb5.accept", |
|
120 "com.sun.net.ssl.server", |
|
121 }; |
|
122 } else if (caller instanceof HttpCaller) { |
112 } else if (caller instanceof HttpCaller) { |
123 alts = new String[] { |
113 alts = new String[] { |
124 "com.sun.security.jgss.krb5.initiate", |
114 "com.sun.security.jgss.krb5.initiate", |
125 }; |
115 }; |
126 } else if (caller == GSSCaller.CALLER_UNKNOWN) { |
116 } else if (caller == GSSCaller.CALLER_UNKNOWN) { |
130 throw new IllegalArgumentException(mechName + " not supported"); |
120 throw new IllegalArgumentException(mechName + " not supported"); |
131 // No other mech at the moment, maybe -- |
121 // No other mech at the moment, maybe -- |
132 /* |
122 /* |
133 switch (caller) { |
123 switch (caller) { |
134 case GSSUtil.CALLER_INITIATE: |
124 case GSSUtil.CALLER_INITIATE: |
135 case GSSUtil.CALLER_SSL_CLIENT: |
|
136 case GSSUtil.CALLER_HTTP_NEGOTIATE: |
125 case GSSUtil.CALLER_HTTP_NEGOTIATE: |
137 alts = new String[] { |
126 alts = new String[] { |
138 "com.sun.security.jgss." + mechName + ".initiate", |
127 "com.sun.security.jgss." + mechName + ".initiate", |
139 }; |
128 }; |
140 break; |
129 break; |
141 case GSSUtil.CALLER_ACCEPT: |
130 case GSSUtil.CALLER_ACCEPT: |
142 case GSSUtil.CALLER_SSL_SERVER: |
|
143 alts = new String[] { |
131 alts = new String[] { |
144 "com.sun.security.jgss." + mechName + ".accept", |
132 "com.sun.security.jgss." + mechName + ".accept", |
145 }; |
133 }; |
146 break; |
134 break; |
147 case GSSUtil.CALLER_UNKNOWN: |
135 case GSSUtil.CALLER_UNKNOWN: |