public class CertResponse extends java.lang.Object implements ASN1Type
CertResponse ::= SEQUENCE {
certReqId INTEGER,
-- to match this response with corresponding request (a value
-- of -1 is to be used if certReqId is not specified in the
-- corresponding request)
status PKIStatusInfo,
certifiedKeyPair CertifiedKeyPair OPTIONAL,
rspInfo OCTET STRING OPTIONAL
-- analogous to the id-regInfo-utf8Pairs OCTET STRING defined
-- for regInfo in CertReqMsg [CRMF]
}
| Constructor and Description |
|---|
CertResponse(ASN1Object obj)
Creates a
CertResponse object from an ASN1Object. |
CertResponse(java.math.BigInteger certReqId,
PKIStatusInfo status)
Creates a new
CertResponse object with the specified
components set. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes a CertResponse structure from an
ASN1Object. |
CertifiedKeyPair |
getCertifiedKeyPair()
Returns the user's certificate and private key, if they have been set;
otherwise
null is returned. |
java.math.BigInteger |
getCertReqId()
Returns the certificate request ID used to match this response with a
request.
|
byte[] |
getRspInfo()
Returns additional information about the response, if it has been set;
otherwise
null is returned. |
PKIStatusInfo |
getStatus()
Returns status information about the request/response.
|
void |
setCertifiedKeyPair(CertifiedKeyPair certifiedKeyPair)
Sets the user's certificate and private key.
|
void |
setRspInfo(byte[] rspInfo)
Sets additional information about the response.
|
ASN1Object |
toASN1Object()
Encodes this
CertResponse object as an ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
CertResponse object. |
public CertResponse(java.math.BigInteger certReqId,
PKIStatusInfo status)
throws java.lang.IllegalArgumentException
CertResponse object with the specified
components set.certReqId - the certificate request idstatus - status information for the request/responsejava.lang.IllegalArgumentException - thrown if any of the parameters are nullpublic CertResponse(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
CertResponse object from an ASN1Object.
The ASN1Object must be a CertResponse structure.
obj - the ASN.1 representation of a CertResponse structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic void setCertifiedKeyPair(CertifiedKeyPair certifiedKeyPair)
certifiedKeyPair - the certifiedKeyPair componentpublic void setRspInfo(byte[] rspInfo)
rspInfo - the rspInfo componentpublic java.math.BigInteger getCertReqId()
public PKIStatusInfo getStatus()
public CertifiedKeyPair getCertifiedKeyPair()
null is returned.public byte[] getRspInfo()
null is returned.public void decode(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of a CertResponse structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic ASN1Object toASN1Object()
CertResponse object as an ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
CertResponse object.toString in class java.lang.Object