IAIK TSP
version 2.32

iaik.tsp
Class PKIStatus

java.lang.Object
  extended by iaik.tsp.PKIStatus

public class PKIStatus
extends java.lang.Object

This class implements the TSP ASN.1 type MessageImprint as it is specified in RFC 3161.

 PKIStatus ::= INTEGER {
     granted (0),
         -- when the PKIStatus contains the value
         -- zero a Time Stamp Token, as requested, is present.
     grantedWithMods (1),
         -- when the PKIStatus contains the value one a Time Stamp Token, with
         --modifications, is present.
     rejection (2),
     waiting (3),
     revocationWarning (4),
         -- this message contains a warning that a revocation is
         -- imminent
     revocationNotification (5),
         -- notification that a revocation has occurred
 }
 
This class handles the ASN.1 structure and the DER encoding and decoding of this structure.


Field Summary
static int GRANTED
          The PKIStatus granted (0)
static java.lang.String GRANTED_TEXT
          The message for the PKIStatus granted (0)
static int GRANTED_WITH_MODS
          The PKIStatus grantedWithMods (1)
static java.lang.String GRANTED_WITH_MODS_TEXT
          The message for the PKIStatus grantedWithMods (1)
static int REJECTION
          The PKIStatus rejection (2)
static java.lang.String REJECTION_TEXT
          The message for the PKIStatus rejection (2)
static int REVOCATION_NOTIFICATION
          The PKIStatus revocationNotification (5)
static java.lang.String REVOCATION_NOTIFICATION_TEXT
          The message for the PKIStatus revocationWarning (5)
static int REVOCATION_WARNING
          The PKIStatus revocationWarning (4)
static java.lang.String REVOCATION_WARNING_TEXT
          The message for the PKIStatus revocationWarning (4)
static int WAITING
          The PKIStatus waiting (3)
static java.lang.String WAITING_TEXT
          The message for the PKIStatus waiting (3)
 
Constructor Summary
PKIStatus(ASN1Object component)
          This constructor tries to reconstruct a PKIStatus object from the given ASN.1 structure.
PKIStatus(int status)
          To construct a new PKIStatus object with the given status code.
 
Method Summary
 byte[] getEncoded()
          This method DER encodes the ASN.1 PKIStatus object.
 int getStatus()
          This method returns the status code.
 java.lang.String getStatusString()
          This method returns the status code as String.
 void setStatus(int status)
          This method sets a new status code.
protected  void testStatusBounds(int status)
          This method checks if the given value is TSP conform.
 ASN1Object toASN1Object()
          Returns the ASN.1 structure of the PKIStatus object.
 java.lang.String toString()
          This method returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRANTED

public static final int GRANTED
The PKIStatus granted (0)

See Also:
Constant Field Values

GRANTED_WITH_MODS

public static final int GRANTED_WITH_MODS
The PKIStatus grantedWithMods (1)

See Also:
Constant Field Values

REJECTION

public static final int REJECTION
The PKIStatus rejection (2)

See Also:
Constant Field Values

WAITING

public static final int WAITING
The PKIStatus waiting (3)

See Also:
Constant Field Values

REVOCATION_WARNING

public static final int REVOCATION_WARNING
The PKIStatus revocationWarning (4)

See Also:
Constant Field Values

REVOCATION_NOTIFICATION

public static final int REVOCATION_NOTIFICATION
The PKIStatus revocationNotification (5)

See Also:
Constant Field Values

GRANTED_TEXT

public static final java.lang.String GRANTED_TEXT
The message for the PKIStatus granted (0)

See Also:
Constant Field Values

GRANTED_WITH_MODS_TEXT

public static final java.lang.String GRANTED_WITH_MODS_TEXT
The message for the PKIStatus grantedWithMods (1)

See Also:
Constant Field Values

REJECTION_TEXT

public static final java.lang.String REJECTION_TEXT
The message for the PKIStatus rejection (2)

See Also:
Constant Field Values

WAITING_TEXT

public static final java.lang.String WAITING_TEXT
The message for the PKIStatus waiting (3)

See Also:
Constant Field Values

REVOCATION_WARNING_TEXT

public static final java.lang.String REVOCATION_WARNING_TEXT
The message for the PKIStatus revocationWarning (4)

See Also:
Constant Field Values

REVOCATION_NOTIFICATION_TEXT

public static final java.lang.String REVOCATION_NOTIFICATION_TEXT
The message for the PKIStatus revocationWarning (5)

See Also:
Constant Field Values
Constructor Detail

PKIStatus

public PKIStatus(int status)
          throws java.lang.IllegalArgumentException
To construct a new PKIStatus object with the given status code.

Parameters:
status - The status code.
Throws:
java.lang.IllegalArgumentException - Thrown if the argument is not a TSP conform value.

PKIStatus

public PKIStatus(ASN1Object component)
          throws CodingException
This constructor tries to reconstruct a PKIStatus object from the given ASN.1 structure.

Parameters:
component - The ASN.1 structure.
Throws:
CodingException - Thrown if the given ASN1Object is not a PKIStatus ASN.1 object.
Method Detail

getEncoded

public byte[] getEncoded()
This method DER encodes the ASN.1 PKIStatus object.

Returns:
DER encoded PKIStatus object.

toASN1Object

public ASN1Object toASN1Object()
Returns the ASN.1 structure of the PKIStatus object.

Returns:
ASN1Object of the PKIStatus object.

setStatus

public void setStatus(int status)
               throws java.lang.IllegalArgumentException
This method sets a new status code.

Parameters:
status - The new status code.
Throws:
java.lang.IllegalArgumentException - Thrown if the argument is not a TSP conform value.

getStatus

public int getStatus()
This method returns the status code.

Returns:
The status code.

getStatusString

public java.lang.String getStatusString()
This method returns the status code as String.

Returns:
The status code as String.

toString

public java.lang.String toString()
This method returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
A string representing the PKIStatus object.

testStatusBounds

protected void testStatusBounds(int status)
                         throws java.lang.IllegalArgumentException
This method checks if the given value is TSP conform.

Parameters:
status - The status value to check.
Throws:
java.lang.IllegalArgumentException - Thrown if the given value is not TSP conform.

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK TSP, © 2002 IAIK, © 2003 - 2014 Stiftung SIC