org.bouncycastle.asn1.isismtt.ocsp
Class RequestedCertificate

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Encodable
      extended by org.bouncycastle.asn1.isismtt.ocsp.RequestedCertificate
All Implemented Interfaces:
ASN1Choice, DEREncodable

public class RequestedCertificate
extends ASN1Encodable
implements ASN1Choice

ISIS-MTT-Optional: The certificate requested by the client by inserting the RetrieveIfAllowed extension in the request, will be returned in this extension.

ISIS-MTT-SigG: The signature act allows publishing certificates only then, when the certificate owner gives his explicit permission. Accordingly, there may be �nondownloadable� certificates, about which the responder must provide status information, but MUST NOT include them in the response. Clients may get therefore the following three kind of answers on a single request including the RetrieveIfAllowed extension:

Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If any of the OCTET STRING options is used, it MUST contain the DER encoding of the requested certificate.

            RequestedCertificate ::= CHOICE {
              Certificate Certificate,
              publicKeyCertificate [0] EXPLICIT OCTET STRING,
              attributeCertificate [1] EXPLICIT OCTET STRING
            }
 


Field Summary
private  byte[] attributeCert
           
static int attributeCertificate
           
private  X509CertificateStructure cert
           
static int certificate
           
private  byte[] publicKeyCert
           
static int publicKeyCertificate
           
 
Fields inherited from class org.bouncycastle.asn1.ASN1Encodable
BER, DER
 
Constructor Summary
private RequestedCertificate(ASN1TaggedObject tagged)
           
  RequestedCertificate(int type, byte[] certificateOctets)
           
  RequestedCertificate(X509CertificateStructure certificate)
          Constructor from a given details.
 
Method Summary
 byte[] getCertificateBytes()
           
static RequestedCertificate getInstance(ASN1TaggedObject obj, boolean explicit)
           
static RequestedCertificate getInstance(java.lang.Object obj)
           
 int getType()
           
 DERObject toASN1Object()
          Produce an object suitable for an ASN1OutputStream.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

certificate

public static final int certificate
See Also:
Constant Field Values

publicKeyCertificate

public static final int publicKeyCertificate
See Also:
Constant Field Values

attributeCertificate

public static final int attributeCertificate
See Also:
Constant Field Values

cert

private X509CertificateStructure cert

publicKeyCert

private byte[] publicKeyCert

attributeCert

private byte[] attributeCert
Constructor Detail

RequestedCertificate

private RequestedCertificate(ASN1TaggedObject tagged)

RequestedCertificate

public RequestedCertificate(X509CertificateStructure certificate)
Constructor from a given details.

Only one parameter can be given. All other must be null.

Parameters:
certificate - Given as Certificate

RequestedCertificate

public RequestedCertificate(int type,
                            byte[] certificateOctets)
Method Detail

getInstance

public static RequestedCertificate getInstance(java.lang.Object obj)

getInstance

public static RequestedCertificate getInstance(ASN1TaggedObject obj,
                                               boolean explicit)

getType

public int getType()

getCertificateBytes

public byte[] getCertificateBytes()

toASN1Object

public DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream.

Returns:

            RequestedCertificate ::= CHOICE {
              Certificate Certificate,
              publicKeyCertificate [0] EXPLICIT OCTET STRING,
              attributeCertificate [1] EXPLICIT OCTET STRING
            }
 

Specified by:
toASN1Object in class ASN1Encodable
Returns:
a DERObject