public class MessageProp extends Object
This is a utility class used within the per-message GSSContext methods to convey per-message properties.
When used with the GSSContext interface's wrap and getMIC methods, an instance of this class is used to indicate the desired Quality-of-Protection (QOP) and to request if confidentiality services are to be applied to caller supplied data (wrap only). To request default QOP, the value of 0 should be used for QOP.
When used with the unwrap and verifyMIC methods of the GSSContext interface, an instance of this class will be used to indicate the applied QOP and confidentiality services over the supplied message. In the case of verifyMIC, the confidentiality state will always be false
. Upon return from these methods, this object will also contain any supplementary status values applicable to the processed token. The supplementary status values can indicate old tokens, out of sequence tokens, gap tokens or duplicate tokens.
GSSContext.wrap(byte[], int, int, org.ietf.jgss.MessageProp)
, GSSContext.unwrap(byte[], int, int, org.ietf.jgss.MessageProp)
, GSSContext.getMIC(byte[], int, int, org.ietf.jgss.MessageProp)
, GSSContext.verifyMIC(byte[], int, int, byte[], int, int, org.ietf.jgss.MessageProp)
public MessageProp(boolean privState)
Constructor which sets the desired privacy state. The QOP value used is 0.
privState
- the privacy (i.e. confidentiality) statepublic MessageProp(int qop, boolean privState)
Constructor which sets the values for the qop and privacy state.
qop
- the QOP valueprivState
- the privacy (i.e. confidentiality) statepublic int getQOP()
Retrieves the QOP value.
setQOP(int)
public boolean getPrivacy()
Retrieves the privacy state.
setPrivacy(boolean)
public void setQOP(int qop)
Sets the QOP value.
qop
- the int value to set the QOP togetQOP()
public void setPrivacy(boolean privState)
Sets the privacy state.
privState
- true is the privacy (i.e., confidentiality) state is true, false otherwise.getPrivacy()
public boolean isDuplicateToken()
Tests if this is a duplicate of an earlier token.
public boolean isOldToken()
Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.
public boolean isUnseqToken()
Tests if a later token had already been processed.
public boolean isGapToken()
Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.
public int getMinorStatus()
Retrieves the minor status code that the underlying mechanism might have set for this per-message operation.
public String getMinorString()
Retrieves a string explaining the minor status code.
null
will be returned when no minor status code has been set.public void setSupplementaryStates(boolean duplicate, boolean old, boolean unseq, boolean gap, int minorStatus, String minorString)
This method sets the state for the supplementary information flags and the minor status in MessageProp. It is not used by the application but by the GSS implementation to return this information to the caller of a per-message context method.
duplicate
- true if the token was a duplicate of an earlier token, false otherwiseold
- true if the token's validity period has expired, false otherwiseunseq
- true if a later token has already been processed, false otherwisegap
- true if one or more predecessor tokens have not yet been successfully processed, false otherwiseminorStatus
- the int minor status code for the per-message operationminorString
- the textual representation of the minorStatus value
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.