FileDocCategorySizeDatePackage
OCSPResponse.javaAPI DocAndroid 1.5 API2443Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.ocsp

OCSPResponse

public class OCSPResponse extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
OCSPResponseStatus
responseStatus
ResponseBytes
responseBytes
Constructors Summary
public OCSPResponse(OCSPResponseStatus responseStatus, ResponseBytes responseBytes)

        this.responseStatus = responseStatus;
        this.responseBytes = responseBytes;
    
public OCSPResponse(org.bouncycastle.asn1.ASN1Sequence seq)

        responseStatus = new OCSPResponseStatus(
                            DEREnumerated.getInstance(seq.getObjectAt(0)));

        if (seq.size() == 2)
        {
            responseBytes = ResponseBytes.getInstance(
                                (ASN1TaggedObject)seq.getObjectAt(1), true);
        }
    
Methods Summary
public static org.bouncycastle.asn1.ocsp.OCSPResponsegetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

        return getInstance(ASN1Sequence.getInstance(obj, explicit));
    
public static org.bouncycastle.asn1.ocsp.OCSPResponsegetInstance(java.lang.Object obj)

        if (obj == null || obj instanceof OCSPResponse)
        {
            return (OCSPResponse)obj;
        }
        else if (obj instanceof ASN1Sequence)
        {
            return new OCSPResponse((ASN1Sequence)obj);
        }

        throw new IllegalArgumentException("unknown object in factory");
    
public ResponseBytesgetResponseBytes()

        return responseBytes;
    
public OCSPResponseStatusgetResponseStatus()

        return responseStatus;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
OCSPResponse ::= SEQUENCE {
responseStatus OCSPResponseStatus,
responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }

        ASN1EncodableVector    v = new ASN1EncodableVector();

        v.add(responseStatus);

        if (responseBytes != null)
        {
            v.add(new DERTaggedObject(true, 0, responseBytes));
        }

        return new DERSequence(v);