public class UnknownInfo
extends java.lang.Object
If an OCSP server does not know about the status of the certificate for which information is requested, it responds with the status "Unknown" (see RFC 2560, RFC 6960):
CertStatus ::= CHOICE { good [0] IMPLICIT NULL, revoked [1] IMPLICIT RevokedInfo, unknown [2] IMPLICIT UnknownInfo } UnknownInfo ::= NULL -- this can be replaced with an enumerationSince the NULL UnknownInfo can be replaced by an enumeration, this class provides the alternative of supplying an int value when
creating
an UnknownInfo. In this case the
interpretation of the ENUMERATED UnknownInfo is left to the application.
However, to support this ENUMERATED choice, a work around is required by
class CertStatus
for parsing an UnknownInfo
since the "unknown" component is implicitly tagged not allowing a choice for
the UnknownInfo:
CertStatus ::= CHOICE {
good [0] IMPLICIT NULL,
revoked [1] IMPLICIT RevokedInfo,
unknown [2] IMPLICIT UnknownInfo }
For creating a cert status for an UnknownInfo simply call the corresponding
constructor of class CertStatus
:
CertStatus certStatus = new CertStatus(new UnknownInfo());
CertStatus
Constructor and Description |
---|
UnknownInfo()
Default constructor.
|
UnknownInfo(ASN1Object obj)
Creates an UnknownInfo from an ASN1Object.
|
UnknownInfo(int value)
Creates an UnknownInfo from the given value to be represented as ASN.1
ENUMERATED.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getValue()
Returns the value of this UnknownInfo.
|
ASN1Object |
toASN1Object()
Returns this UnknownInfo as an ASN1Object.
|
java.lang.String |
toString()
Gives a String representation of this UnknownInfo.
|
public UnknownInfo()
public UnknownInfo(int value)
value
- the value that shall be represented by this enumeration
UnknownInfopublic UnknownInfo(ASN1Object obj) throws CodingException
obj
- the UnknownInfo as ASN1ObjectCodingException
- if the ASN1Object has the wrong formatpublic ASN1Object toASN1Object()
public java.lang.Object getValue()
public java.lang.String toString()
toString
in class java.lang.Object