public class CertRepMessage extends java.lang.Object implements ASN1Type
CertRepMessage ::= SEQUENCE {
caPubs [1] SEQUENCE SIZE (1..MAX) OF Certificate OPTIONAL,
response SEQUENCE OF CertResponseCMP
}
| Constructor and Description |
|---|
CertRepMessage(ASN1Object obj)
Creates a
CertRepMessage object from an
ASN1Object. |
CertRepMessage(CertResponse response)
Creates a new
CertRepMessage object that contains a single
certificate response. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCaPubs(X509Certificate caPubs)
Adds the specified CA certificate.
|
void |
addResponse(CertResponse response)
Adds the specified certificate response.
|
void |
decode(ASN1Object obj)
Decodes a CertRepMessage structure from an
ASN1Object. |
X509Certificate[] |
getCaPubs()
Returns all the CA certificates that this object contains as an array of
X509Certificate objects. |
CertResponse[] |
getResponse()
Returns all the certificate responses that this object contains as an
array of
CertResponse objects. |
ASN1Object |
toASN1Object()
Encodes this
CertRepMessage object as an
ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
CertRepMessage object. |
public CertRepMessage(CertResponse response) throws java.lang.IllegalArgumentException
CertRepMessage object that contains a single
certificate response.
response - the certificate responsejava.lang.IllegalArgumentException - thrown if the parameter is nullpublic CertRepMessage(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
CertRepMessage object from an
ASN1Object.
The ASN1Object must be a CertRepMessage structure.
obj - the ASN.1 representation of a CertRepMessage structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic X509Certificate[] getCaPubs()
X509Certificate objects.
If this object contains no CA certificates then an empty array is returned.
public CertResponse[] getResponse()
CertResponse objects.
public void addCaPubs(X509Certificate caPubs)
If the specified CA certificate is null, it will not be added.
caPubs - the CA certificate to be addedpublic void addResponse(CertResponse response)
If the specified certificate response is null, it will not be
added.
response - the certificate response to be addedpublic void decode(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
ASN1Object.
decode in interface ASN1Typeobj - an ASN.1 representation of a CertRepMessage structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic ASN1Object toASN1Object()
CertRepMessage object as an
ASN1Object.
toASN1Object in interface ASN1Typepublic java.lang.String toString()
CertRepMessage object.
toString in class java.lang.Object