com.sun.gssapi
Class MessageProp

java.lang.Object
  extended by com.sun.gssapi.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(byte[], int, int, com.sun.gssapi.MessageProp), GSSContext.unwrap(byte[], int, int, com.sun.gssapi.MessageProp), GSSContext.getMIC(byte[], int, int, com.sun.gssapi.MessageProp), GSSContext.verifyMIC(byte[], int, int, byte[], int, int, com.sun.gssapi.MessageProp)

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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

getQOP

public int getQOP()
Retrieves the QOP value.

Returns:
the QOP value

getPrivacy

public boolean getPrivacy()
Retrieves the privacy state.

Returns:
true indicates privacy has been applied

setQOP

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

Parameters:
QOP - value to store.

setPrivacy

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

Parameters:
privacy - value to store.

isDuplicateToken

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


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.


isGapToken

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


setGapTokenStatus

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


setDuplicateTokenStatus

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


setOldTokenState

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


setUnseqTokenStatus

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