public class PKIStatusInfo extends java.lang.Object implements ASN1Type
PKIStatusInfo ::= SEQUENCE {
status PKIStatus,
statusString PKIFreeText OPTIONAL,
failInfo PKIFailureInfo OPTIONAL
}
PKIStatus ::= INTEGER {
granted (0),
-- you got exactly what you asked for
grantedWithMods (1),
-- you got something like what you asked for; the
-- requester is responsible for ascertaining the differences
rejection (2),
-- you don't get it, more information elsewhere in the message
waiting (3),
-- the request body part has not yet been processed,
-- expect to hear more later
revocationWarning (4),
-- this message contains a warning that a revocation is
-- imminent
revocationNotification (5),
-- notification that a revocation has occurred
keyUpdateWarning (6)
-- update already done for the oldCertId specified in
-- CertReqMsg
}
PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
-- text encoded as UTF-8 String (note: each UTF8String SHOULD
-- include an RFC 1766 language tag to indicate the language
-- of the contained text)
PKIFailureInfo ::= BIT STRING {
-- since we can fail in more than one way!
-- More codes may be added in the future if/when required.
badAlg (0),
-- unrecognized or unsupported Algorithm Identifier
badMessageCheck (1),
-- integrity check failed (e.g., signature did not verify)
badRequest (2),
-- transaction not permitted or supported
badTime (3),
-- messageTime was not sufficiently close to the system time,
-- as defined by local policy
badCertId (4),
-- no certificate could be found matching the provided criteria
badDataFormat (5),
-- the data submitted has the wrong format
wrongAuthority (6),
-- the authority indicated in the request is different from the
-- one creating the response token
incorrectData (7),
-- the requester's data is incorrect (for notary services)
missingTimeStamp (8),
-- when the timestamp is missing but should be there (by policy)
badPOP (9)
-- the proof-of-possession failed
}
| Modifier and Type | Class and Description |
|---|---|
static class |
PKIStatusInfo.PKIFailureInfo
Contains a set of pre-defined (known) PKIFailureInfo values.
|
static class |
PKIStatusInfo.PKIStatus
Contains a set of pre-defined (known) PKIStatus values.
|
| Constructor and Description |
|---|
PKIStatusInfo(ASN1Object obj)
Creates a new
PKIStatusInfo object from an
ASN1Object. |
PKIStatusInfo(int status)
Creates a new
PKIStatusInfo object with the specified
component. |
| Modifier and Type | Method and Description |
|---|---|
void |
addStatusString(java.lang.String statusString)
Adds the status information to the set of status information.
|
void |
decode(ASN1Object obj)
Decodes an PKIStatusInfo structure from an
ASN1Object. |
BinaryString |
getFailInfo()
Returns the failure code as a binary string if it has been set; otherwise
null is returned. |
int |
getStatus()
Returns the status code.
|
java.lang.String[] |
getStatusString()
Returns all the human-readable status information if it has been set;
otherwise
null is returned. |
void |
setFailInfo(BinaryString failInfo)
Sets the failure information from a binary string.
|
void |
setStatusString(java.lang.String[] statusString)
Sets the set of status information.
|
ASN1Object |
toASN1Object()
Encodes this
PKIStatusInfo object as an
ASN1Object. |
java.lang.String |
toMessageString()
Creates a message string that represents the contents of this
PKIStatusInfo object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
PKIStatusInfo object. |
public PKIStatusInfo(int status)
PKIStatusInfo object with the specified
component.status - indicates the statuspublic PKIStatusInfo(ASN1Object obj) throws CodingException
PKIStatusInfo object from an
ASN1Object.obj - the ASN.1 representation of an PKIStatusInfo structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic int getStatus()
public java.lang.String[] getStatusString()
null is returned.public BinaryString getFailInfo()
null is returned.
public void setStatusString(java.lang.String[] statusString)
If the status information is not null, then it must consist
of one or more String objects.
statusString - the statusString componentpublic void addStatusString(java.lang.String statusString)
If statusString is null, it is not added.
statusString - the status information to be added to the statusString componentpublic void setFailInfo(BinaryString failInfo)
failInfo - the failure information in binary string formatpublic void decode(ASN1Object obj) throws CodingException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of a PKIStatusInfo structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic ASN1Object toASN1Object()
PKIStatusInfo object as an
ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
PKIStatusInfo object.toString in class java.lang.Objectpublic java.lang.String toMessageString()
PKIStatusInfo object. This method can be used to create
messages that can be returned in exceptions.