@@ -908,15 +908,11 @@ public final int getWrapSizeLimit(int qop, boolean confReq,
908
908
909
909
public final byte [] wrap (byte inBuf [], int offset , int len ,
910
910
MessageProp msgProp ) throws GSSException {
911
- if (DEBUG ) {
912
- System .out .println ("Krb5Context.wrap: data=["
913
- + getHexBytes (inBuf , offset , len )
914
- + "]" );
915
- }
916
911
917
- if (state != STATE_DONE )
918
- throw new GSSException (GSSException .NO_CONTEXT , -1 ,
919
- "Wrap called in invalid state!" );
912
+ if (state != STATE_DONE ) {
913
+ throw new GSSException (GSSException .NO_CONTEXT , -1 ,
914
+ "Wrap called in invalid state!" );
915
+ }
920
916
921
917
byte [] encToken = null ;
922
918
try {
@@ -1061,12 +1057,6 @@ public final byte[] unwrap(byte inBuf[], int offset, int len,
1061
1057
setSequencingAndReplayProps (token , msgProp );
1062
1058
}
1063
1059
1064
- if (DEBUG ) {
1065
- System .out .println ("Krb5Context.unwrap: data=["
1066
- + getHexBytes (data , 0 , data .length )
1067
- + "]" );
1068
- }
1069
-
1070
1060
return data ;
1071
1061
}
1072
1062
@@ -1412,8 +1402,8 @@ public byte[] getEncoded() {
1412
1402
1413
1403
@ Override
1414
1404
public String toString () {
1415
- return "Kerberos session key: etype: " + key .getEType () + " \n " +
1416
- new sun . misc . HexDumpEncoder (). encodeBuffer (key .getBytes ());
1405
+ return "Kerberos session key: etype= " + key .getEType ()
1406
+ + ", " + Krb5Util . keyInfo (key .getBytes ());
1417
1407
}
1418
1408
}
1419
1409
0 commit comments