Top Description Fields Constructors Methods
org.bouncycastle.cmc

public Class SimplePKIResponse

extends Object
implements Encodable
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Encodable
Imports
java.io.IOException, org.bouncycastle.asn1.ASN1Primitive, org.bouncycastle.asn1.cms.ContentInfo, org.bouncycastle.cert.X509CRLHolder, .X509CertificateHolder, org.bouncycastle.cms.CMSException, .CMSSignedData, org.bouncycastle.util.Encodable, .Store

Carrier for a Simple PKI Response.

A Simple PKI Response is defined in RFC 5272 as a CMS SignedData object with no EncapsulatedContentInfo and no SignerInfos attached.

Field Summary

Modifier and TypeField and Description
private final CMSSignedData

Constructor Summary

AccessConstructor and Description
public
SimplePKIResponse(byte[]
BER/DER encoding of the certificate.
responseEncoding
)

Create a SimplePKIResponse from the passed in bytes.

public
SimplePKIResponse(ContentInfo
a ContentInfo containing a SignedData.
signedData
)

Create a SimplePKIResponse from the passed in ASN.1 structure.

Method Summary

Modifier and TypeMethod and Description
public Store<X509CertificateHolder>

Returns:

a Store of X509CertificateHolder objects.
getCertificates
()

Return any X.509 certificate objects in this SimplePKIResponse structure as a Store of X509CertificateHolder objects.

public Store<X509CRLHolder>

Returns:

a Store of X509CRLHolder objects.
getCRLs
()

Return any X.509 CRL objects in this SimplePKIResponse structure as a Store of X509CRLHolder objects.

public byte[]
getEncoded()

Implements org.bouncycastle.util.Encodable.getEncoded.

return the ASN.1 encoded representation of this object.

private static ContentInfo
parseBytes(byte[] responseEncoding)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateResponseback to summary
private final CMSSignedData certificateResponse

Constructor Detail

SimplePKIResponseback to summary
public SimplePKIResponse(byte[] responseEncoding) throws CMCException

Create a SimplePKIResponse from the passed in bytes.

Parameters
responseEncoding:byte[]

BER/DER encoding of the certificate.

Exceptions
CMCException:
in the event of corrupted data, or an incorrect structure.
SimplePKIResponseback to summary
public SimplePKIResponse(ContentInfo signedData) throws CMCException

Create a SimplePKIResponse from the passed in ASN.1 structure.

Parameters
signedData:ContentInfo

a ContentInfo containing a SignedData.

Method Detail

getCertificatesback to summary
public Store<X509CertificateHolder> getCertificates()

Return any X.509 certificate objects in this SimplePKIResponse structure as a Store of X509CertificateHolder objects.

Returns:Store<X509CertificateHolder>

a Store of X509CertificateHolder objects.

getCRLsback to summary
public Store<X509CRLHolder> getCRLs()

Return any X.509 CRL objects in this SimplePKIResponse structure as a Store of X509CRLHolder objects.

Returns:Store<X509CRLHolder>

a Store of X509CRLHolder objects.

getEncodedback to summary
public byte[] getEncoded() throws IOException

Implements org.bouncycastle.util.Encodable.getEncoded.

return the ASN.1 encoded representation of this object.

Returns:byte[]

Doc from org.bouncycastle.util.Encodable.getEncoded.

a byte array representing the encoding.

Exceptions
IOException:

Doc from org.bouncycastle.util.Encodable.getEncoded.

if an issue arises generation the encoding.

parseBytesback to summary
private static ContentInfo parseBytes(byte[] responseEncoding) throws CMCException