APIdia Launch Partner
Top Description Fields Constructors Methods
org.ietf.jgss

public Class MessageProp

extends Object
Class Inheritance

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.

Author
Mayank Upadhyay
Since
1.4
See Also
GSSContext#wrap, GSSContext#unwrap, GSSContext#getMIC, GSSContext#verifyMIC

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private int
private String
private boolean
private boolean
private int
private boolean

Constructor Summary

AccessConstructor and Description
public
MessageProp(boolean
the privacy (i.e. confidentiality) state
privState
)

Constructor which sets the desired privacy state.

public
MessageProp(int
the QOP value
qop
,
boolean
the privacy (i.e. confidentiality) state
privState
)

Constructor which sets the values for the qop and privacy state.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the int minor status
getMinorStatus
()

Retrieves the minor status code that the underlying mechanism might have set for this per-message operation.

public String

Returns:

a String corresponding to the minor status code. null will be returned when no minor status code has been set.
getMinorString
()

Retrieves a string explaining the minor status code.

public boolean

Returns:

true if the privacy (i.e., confidentiality) state is true, false otherwise.
getPrivacy
()

Retrieves the privacy state.

public int

Returns:

an int representing the QOP value
getQOP
()

Retrieves the QOP value.

public boolean

Returns:

true if this is a duplicate, false otherwise.
isDuplicateToken
()

Tests if this is a duplicate of an earlier token.

public boolean

Returns:

true if an expected per-message token was not received, false otherwise.
isGapToken
()

Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.

public boolean

Returns:

true if the token's validity period has expired, false otherwise.
isOldToken
()

Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.

public boolean

Returns:

true if a later token had already been processed, false otherwise.
isUnseqToken
()

Tests if a later token had already been processed.

private void
resetStatusValues()

Resets the supplementary status values to false.

public void
setPrivacy(boolean
true is the privacy (i.e., confidentiality) state is true, false otherwise.
privState
)

Sets the privacy state.

public void
setQOP(int
the int value to set the QOP to
qop
)

Sets the QOP value.

public void
setSupplementaryStates(boolean
true if the token was a duplicate of an earlier token, false otherwise
duplicate
,
boolean
true if the token's validity period has expired, false otherwise
old
,
boolean
true if a later token has already been processed, false otherwise
unseq
,
boolean
true if one or more predecessor tokens have not yet been successfully processed, false otherwise
gap
,
int
the int minor status code for the per-message operation
minorStatus
,
String
the textual representation of the minorStatus value
minorString
)

This method sets the state for the supplementary information flags and the minor status in MessageProp.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dupTokenback to summary
private boolean dupToken
gapTokenback to summary
private boolean gapToken
minorStatusback to summary
private int minorStatus
minorStringback to summary
private String minorString
oldTokenback to summary
private boolean oldToken
privacyStateback to summary
private boolean privacyState
qopback to summary
private int qop
unseqTokenback to summary
private boolean unseqToken

Constructor Detail

MessagePropback to summary
public MessageProp(boolean privState)

Constructor which sets the desired privacy state. The QOP value used is 0.

Parameters
privState:boolean

the privacy (i.e. confidentiality) state

MessagePropback to summary
public MessageProp(int qop, boolean privState)

Constructor which sets the values for the qop and privacy state.

Parameters
qop:int

the QOP value

privState:boolean

the privacy (i.e. confidentiality) state

Method Detail

getMinorStatusback to summary
public int getMinorStatus()

Retrieves the minor status code that the underlying mechanism might have set for this per-message operation.

Returns:int

the int minor status

getMinorStringback to summary
public String getMinorString()

Retrieves a string explaining the minor status code.

Returns:String

a String corresponding to the minor status code. null will be returned when no minor status code has been set.

getPrivacyback to summary
public boolean getPrivacy()

Retrieves the privacy state.

Returns:boolean

true if the privacy (i.e., confidentiality) state is true, false otherwise.

See Also
setPrivacy
getQOPback to summary
public int getQOP()

Retrieves the QOP value.

Returns:int

an int representing the QOP value

See Also
setQOP
isDuplicateTokenback to summary
public boolean isDuplicateToken()

Tests if this is a duplicate of an earlier token.

Returns:boolean

true if this is a duplicate, false otherwise.

isGapTokenback to summary
public boolean isGapToken()

Tests if an expected token was not received, i.e., one or more predecessor tokens have not yet been successfully processed.

Returns:boolean

true if an expected per-message token was not received, false otherwise.

isOldTokenback to summary
public boolean isOldToken()

Tests if this token's validity period has expired, i.e., the token is too old to be checked for duplication.

Returns:boolean

true if the token's validity period has expired, false otherwise.

isUnseqTokenback to summary
public boolean isUnseqToken()

Tests if a later token had already been processed.

Returns:boolean

true if a later token had already been processed, false otherwise.

resetStatusValuesback to summary
private void resetStatusValues()

Resets the supplementary status values to false.

setPrivacyback to summary
public void setPrivacy(boolean privState)

Sets the privacy state.

Parameters
privState:boolean

true is the privacy (i.e., confidentiality) state is true, false otherwise.

See Also
getPrivacy
setQOPback to summary
public void setQOP(int qop)

Sets the QOP value.

Parameters
qop:int

the int value to set the QOP to

See Also
getQOP
setSupplementaryStatesback to summary
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.

Parameters
duplicate:boolean

true if the token was a duplicate of an earlier token, false otherwise

old:boolean

true if the token's validity period has expired, false otherwise

unseq:boolean

true if a later token has already been processed, false otherwise

gap:boolean

true if one or more predecessor tokens have not yet been successfully processed, false otherwise

minorStatus:int

the int minor status code for the per-message operation

minorString:String

the textual representation of the minorStatus value