# HG changeset patch # User weijun # Date 1259283102 -28800 # Node ID 2a6d13ebbbed7b56b0d8920cf4786afc40c42d22 # Parent 4c792c19266e321290fd771e670cccf302a1091a 6901085: SPNEGO does not works with native program Reviewed-by: valeriep diff -r 4c792c19266e -r 2a6d13ebbbed jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java --- a/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java Fri Nov 27 08:51:28 2009 +0800 +++ b/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java Fri Nov 27 08:51:42 2009 +0800 @@ -317,14 +317,9 @@ mechToken = GSS_initSecContext(null); errorCode = GSSException.DEFECTIVE_TOKEN; - byte[] micToken = null; - if (!GSSUtil.useMSInterop()) { - // calculate MIC only in normal mode - micToken = generateMechListMIC(DER_mechTypes); - } // generate SPNEGO token initToken = new NegTokenInit(DER_mechTypes, getContextFlags(), - mechToken, micToken); + mechToken, null); if (DEBUG) { System.out.println("SpNegoContext.initSecContext: " + "sending token of type = " + @@ -583,15 +578,9 @@ "negotiated result = " + negoResult); } - // calculate MIC only in normal mode - byte[] micToken = null; - if (!GSSUtil.useMSInterop() && valid) { - micToken = generateMechListMIC(DER_mechTypes); - } - // generate SPNEGO token NegTokenTarg targToken = new NegTokenTarg(negoResult.ordinal(), - mech_wanted, accept_token, micToken); + mech_wanted, accept_token, null); if (DEBUG) { System.out.println("SpNegoContext.acceptSecContext: " + "sending token of type = " + @@ -735,9 +724,9 @@ } /** - * generate MIC on mechList + * generate MIC on mechList. Not used at the moment. */ - private byte[] generateMechListMIC(byte[] mechTypes) + /*private byte[] generateMechListMIC(byte[] mechTypes) throws GSSException { // sanity check the required input @@ -774,7 +763,7 @@ } } return mic; - } + }*/ /** * verify MIC on MechList