--- old/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java 2015-04-08 15:27:50.931467894 +0400 +++ new/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java 2015-04-08 15:27:50.567467910 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,7 +104,7 @@ * operations on the GSSContext object are presented, * including: object instantiation, setting of desired flags, context * establishment, query of actual context flags, per-message operations on - * application data, and finally context deletion.

+ * application data, and finally context deletion. * *

  *    // Create a context using default credentials
@@ -209,7 +209,7 @@
      * Some mechanism providers might require that the caller be granted
      * permission to initiate a security context. A failed permission check
      * might cause a {@link java.lang.SecurityException SecurityException}
-     * to be thrown from this method.

+ * to be thrown from this method. * * @return a byte[] containing the token to be sent to the * peer. null indicates that no token is generated. @@ -276,7 +276,7 @@ * to be thrown from this method.

* * The following example code demonstrates how this method might be - * used:

+ * used: *

      *     InputStream is ...
      *     OutputStream os ...
@@ -346,7 +346,7 @@
      * to be thrown from this method.

* * The following example code demonstrates how this method might be - * used:

+ * used: *

      *     byte[] inToken;
      *     byte[] outToken;
@@ -423,7 +423,7 @@
      * to be thrown from this method.

* * The following example code demonstrates how this method might be - * used:

+ * used: *

      *     InputStream is ...
      *     OutputStream os ...
@@ -510,7 +510,7 @@
      * GSS-API implementations are recommended but not required to detect
      * invalid QOP values when getWrapSizeLimit is called.
      * This routine guarantees only a maximum message size, not the
-     * availability of specific QOP values for message protection.

+ * availability of specific QOP values for message protection. * * @param qop the level of protection wrap will be asked to provide. * @param confReq true if wrap will be asked to provide @@ -595,7 +595,7 @@ * * Since some application-level protocols may wish to use tokens * emitted by wrap to provide "secure framing", implementations should - * support the wrapping of zero-length messages.

+ * support the wrapping of zero-length messages. * * @param inStream an InputStream containing the application data to be * protected. All of the data that is available in @@ -630,7 +630,7 @@ * * Since some application-level protocols may wish to use tokens * emitted by wrap to provide "secure framing", implementations should - * support the wrapping and unwrapping of zero-length messages.

+ * support the wrapping and unwrapping of zero-length messages. * * @param inBuf a byte array containing the wrap token received from * peer. @@ -679,7 +679,7 @@ * * Other than the possible blocking behavior described above, this * method is equivalent to the byte array based {@link #unwrap(byte[], - * int, int, MessageProp) unwrap} method.

+ * int, int, MessageProp) unwrap} method. * * @param inStream an InputStream that contains the wrap token generated * by the peer. @@ -827,7 +827,7 @@ * * Other than the possible blocking behavior described above, this * method is equivalent to the byte array based {@link #verifyMIC(byte[], - * int, int, byte[], int, int, MessageProp) verifyMIC} method.

+ * int, int, byte[], int, int, MessageProp) verifyMIC} method. * * @param tokStream an InputStream containing the token generated by the * peer's getMIC method. @@ -913,7 +913,7 @@ * might require mutual authentication even if the application * doesn't. Therefore, the application should check to see if the * request was honored with the {@link #getMutualAuthState() - * getMutualAuthState} method.

+ * getMutualAuthState} method. * * @param state a boolean value indicating whether mutual * authentication should be used or not. @@ -943,7 +943,7 @@ * MessageProp#isOldToken() MessageProp.isOldToken} methods will return * valid results for the MessageProp object that is passed * in to the unwrap method or the verifyMIC - * method.

+ * method. * * @param state a boolean value indicating whether replay detection * should be enabled over the established context or not. @@ -975,7 +975,7 @@ * {@link MessageProp#isGapToken() MessageProp.isGapToken} methods will return * valid results for the MessageProp object that is passed * in to the unwrap method or the verifyMIC - * method.

+ * method. * * @param state a boolean value indicating whether sequence checking * should be enabled over the established context or not. @@ -1001,7 +1001,7 @@ * delegation must not be used, then the mechanism will honor the * request and delegation will not occur. This is an exception * to the general rule that a mechanism may enable a service even if it - * is not requested.

+ * is not requested. * * @param state a boolean value indicating whether the credentials * should be delegated or not. @@ -1021,7 +1021,7 @@ * * Not all mechanisms support anonymity for the initiator. Therefore, the * application should check to see if the request was honored with the - * {@link #getAnonymityState() getAnonymityState} method.

+ * {@link #getAnonymityState() getAnonymityState} method. * * @param state a boolean value indicating if the initiator should * be authenticated to the acceptor as an anonymous principal. @@ -1048,7 +1048,7 @@ * object that is passed in to the wrap method.

* * Enabling confidentiality will also automatically enable - * integrity.

+ * integrity. * * @param state a boolean value indicating whether confidentiality * should be enabled or not. @@ -1075,7 +1075,7 @@ * the {@link #getIntegState() getIntegState} method.

* * Disabling integrity will also automatically disable - * confidentiality.

+ * confidentiality. * * @param state a boolean value indicating whether integrity * should be enabled or not. @@ -1095,7 +1095,7 @@ * * The actual lifetime of the context will depend on the capabilities of * the underlying mechanism and the application should call the {@link - * #getLifetime() getLifetime} method to determine this.

+ * #getLifetime() getLifetime} method to determine this. * * @param lifetime the desired context lifetime in seconds. Use * INDEFINITE_LIFETIME to request an indefinite lifetime @@ -1133,7 +1133,7 @@ * initiator requests that delegation not be allowed the {@link * #requestCredDeleg(boolean) requestCredDeleg} method will honor that * request and this method will return false on the - * initiator's side from that point onwards.

+ * initiator's side from that point onwards. * * @return true if delegation is enabled, false otherwise. * @see #requestCredDeleg(boolean) @@ -1147,7 +1147,7 @@ * called only after context establishment is complete. An initiator * that requests mutual authentication can call this method after * context completion and dispose the context if its request was not - * honored.

+ * honored. * * @return true if mutual authentication is enabled, false otherwise. * @see #requestMutualAuth(boolean) @@ -1161,7 +1161,7 @@ * definitive answer this method must be called only after context * establishment is complete. An initiator that requests replay * detection can call this method after context completion and - * dispose the context if its request was not honored.

+ * dispose the context if its request was not honored. * * @return true if replay detection is enabled, false otherwise. * @see #requestReplayDet(boolean) @@ -1175,7 +1175,7 @@ * definitive answer this method must be called only after context * establishment is complete. An initiator that requests sequence * checking can call this method after context completion and - * dispose the context if its request was not honored.

+ * dispose the context if its request was not honored. * * @return true if sequence checking is enabled, false otherwise. * @see #requestSequenceDet(boolean) @@ -1195,7 +1195,7 @@ * should be sent to the peer or the context aborted. On the * acceptor side, a call to this method determines if any of the tokens * processed by acceptSecContext thus far have divulged - * the identity of the initiator.

+ * the identity of the initiator. * * @return true if the context initiator is still anonymous, false * otherwise. @@ -1235,7 +1235,7 @@ * #isProtReady() isProtReady} or {@link #isEstablished() * isEstablished} return true. If this method returns * true, so will {@link #getIntegState() - * getIntegState}

+ * getIntegState} * * @return true if confidentiality services are available, false * otherwise. @@ -1250,7 +1250,7 @@ * #isProtReady() isProtReady} or {@link #isEstablished() * isEstablished} return true. This method will always * return true if {@link #getConfState() getConfState} - * returns true.

+ * returns true. * * @return true if integrity services are available, false otherwise. * @see #requestInteg(boolean) @@ -1262,7 +1262,7 @@ * context is. It can be called by both the context initiator and the * context acceptor, but for a definitive answer it should be called * only after {@link #isEstablished() isEstablished} returns - * true.

+ * true. * * @return the remaining lifetime in seconds * @see #requestLifetime(int)