Class MessageProp
public class MessageProp extends Object
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.
Constructor Summary
Constructor | Description |
---|---|
MessageProp |
Constructor which sets the desired privacy state. |
MessageProp |
Constructor which sets the values for the qop and privacy state. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
int |
getMinorStatus() |
Retrieves the minor status code that the underlying mechanism might have set for this per-message operation. |
String |
getMinorString() |
Retrieves a string explaining the minor status code. |
boolean |
getPrivacy() |
Retrieves the privacy state. |
int |
getQOP() |
Retrieves the QOP value. |
boolean |
isDuplicateToken() |
Tests if this is a duplicate of an earlier token. |
boolean |
isGapToken() |
Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed. |
boolean |
isOldToken() |
Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication. |
boolean |
isUnseqToken() |
Tests if a later token had already been processed. |
void |
setPrivacy |
Sets the privacy state. |
void |
setQOP |
Sets the QOP value. |
void |
setSupplementaryStates |
This method sets the state for the supplementary information flags and the minor status in MessageProp. |
Constructor Details
MessageProp
public MessageProp(boolean privState)
- Parameters:
-
privState
- the privacy (i.e. confidentiality) state
MessageProp
public MessageProp(int qop, boolean privState)
- Parameters:
-
qop
- the QOP value -
privState
- the privacy (i.e. confidentiality) state
Method Details
getQOP
public int getQOP()
- Returns:
- an int representing the QOP value
- See Also:
getPrivacy
public boolean getPrivacy()
- Returns:
- true if the privacy (i.e., confidentiality) state is true, false otherwise.
- See Also:
setQOP
public void setQOP(int qop)
- Parameters:
-
qop
- the int value to set the QOP to - See Also:
setPrivacy
public void setPrivacy(boolean privState)
- Parameters:
-
privState
- true is the privacy (i.e., confidentiality) state is true, false otherwise. - See Also:
isDuplicateToken
public boolean isDuplicateToken()
- Returns:
- true if this is a duplicate, false otherwise.
isOldToken
public boolean isOldToken()
- Returns:
- true if the token's validity period has expired, false otherwise.
isUnseqToken
public boolean isUnseqToken()
- Returns:
- true if a later token had already been processed, false otherwise.
isGapToken
public boolean isGapToken()
- Returns:
- true if an expected per-message token was not received, false otherwise.
getMinorStatus
public int getMinorStatus()
- Returns:
- the int minor status
getMinorString
public String getMinorString()
- Returns:
- a String corresponding to the minor status code.
null
will be returned when no minor status code has been set.
setSupplementaryStates
public void setSupplementaryStates(boolean duplicate, boolean old, boolean unseq, boolean gap, int minorStatus, String minorString)
- Parameters:
-
duplicate
- true if the token was a duplicate of an earlier token, false otherwise -
old
- true if the token's validity period has expired, false otherwise -
unseq
- true if a later token has already been processed, false otherwise -
gap
- true if one or more predecessor tokens have not yet been successfully processed, false otherwise -
minorStatus
- the int minor status code for the per-message operation -
minorString
- the textual representation of the minorStatus value
© 1993, 2021, 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.
https://docs.oracle.com/en/java/javase/17/docs/api/java.security.jgss/org/ietf/jgss/MessageProp.html