com.sun.gssapi

Class MessageProp


public class MessageProp
extends java.lang.Object

This class conveys information about the per-message security services requested/provided through the GSSContext class in the wrap and getMIC methods. It allows the caller to specify the desired per-message Quality of Protection (QOP) and privacy state. Upon return from these calls, this object indicates the actual applied QOP and confidentiality state. Instances of this class are also used by the unwrap and verifyMIC methods to obtain the message protection applied by the peer. The QOP indicates the algorithm used to protect the message. The privacy flag indicates if message privacy has been applied. Methods are also provided to query for supplementary status information for the processed token.
See Also:
GSSContext.wrap, GSSContext.unwrap, GSSContext.getMIC, GSSContext.verifyMIC

Constructor Summary

MessageProp()
Default constructor for the class.
MessageProp(int qop, boolean privState)
Constructor allowing the setting of the qop and the privacy state.

Method Summary

boolean
getPrivacy()
Retrieves the privacy state.
int
getQOP()
Retrieves the QOP value.
boolean
isDuplicateToken()
Method to signal supplementary information.
boolean
isGapToken()
Method to signal supplementary information.
boolean
isOldToken()
Method to signal supplementary information.
boolean
isUnseqToken()
Method to signal supplementary information.
void
setDuplicateTokenStatus()
Used by mechanism packages to set supplementary status value.
void
setGapTokenStatus()
Used by mechanism packages to set supplementary status value.
void
setOldTokenState()
Used by mechanism packages to set supplementary status value.
void
setPrivacy(boolean privState)
Sets the privacy state.
void
setQOP(int qopVal)
Sets the QOP value.
void
setUnseqTokenStatus()
Used by mechanism packages to set supplementary status value.

Constructor Details

MessageProp

public MessageProp()
Default constructor for the class. QOP is set to 0 and confidentiality to false.

MessageProp

public MessageProp(int qop,
                   boolean privState)
Constructor allowing the setting of the qop and the privacy state.
Parameters:
qop - the qop value for the message
privState - indicates privacy request/applied state

Method Details

getPrivacy

public boolean getPrivacy()
Retrieves the privacy state.
Returns:
true indicates privacy has been applied

getQOP

public int getQOP()
Retrieves the QOP value.
Returns:
the QOP value

isDuplicateToken

public boolean isDuplicateToken()
Method to signal supplementary information. Returns true if this is a duplicate of an earlier token.

isGapToken

public boolean isGapToken()
Method to signal supplementary information. Returns true if an expected per-message token was not received.

isOldToken

public boolean isOldToken()
Method to signal supplementary information. Returns true if the token's validity period has expired.

isUnseqToken

public boolean isUnseqToken()
Method to signal supplementary information. Returns true if a later token has already been processed.

setDuplicateTokenStatus

public void setDuplicateTokenStatus()
Used by mechanism packages to set supplementary status value. Indicates this is a duplicate of an earlier token.

setGapTokenStatus

public void setGapTokenStatus()
Used by mechanism packages to set supplementary status value. Indicates that an expected per-message token was not received.

setOldTokenState

public void setOldTokenState()
Used by mechanism packages to set supplementary status value. Indicates that the token's validity period has expired.

setPrivacy

public void setPrivacy(boolean privState)
Sets the privacy state.
Parameters:

setQOP

public void setQOP(int qopVal)
Sets the QOP value.
Parameters:

setUnseqTokenStatus

public void setUnseqTokenStatus()
Used by mechanism packages to set supplementary status value. Indicates that a later token has already been processed.