< prev index next >

src/java.security.jgss/share/classes/sun/security/jgss/spnego/SpNegoContext.java

Print this page
rev 11805 : 8078439: Kerberos auth fails if client proposes MS krb5 OID

@@ -536,11 +536,13 @@
                 internal_mech = mech_wanted;
 
                 // get the token for mechanism
                 byte[] accept_token;
 
-                if (mechList[0].equals(mech_wanted)) {
+                if (mechList[0].equals(mech_wanted) ||
+                        (GSSUtil.isKerberosMech(mechList[0]) &&
+                         GSSUtil.isKerberosMech(mech_wanted))) {
                     // get the mechanism token
                     byte[] mechToken = initToken.getMechToken();
                     if (mechToken == null) {
                         throw new GSSException(GSSException.FAILURE, -1,
                                 "mechToken is missing");
< prev index next >