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

CertStatus

public class CertStatus extends org.bouncycastle.asn1.ASN1Encodable implements org.bouncycastle.asn1.ASN1Choice

Fields Summary
private int
tagNo
private org.bouncycastle.asn1.DEREncodable
value
Constructors Summary
public CertStatus()
create a CertStatus object with a tag of zero.

        tagNo = 0;
        // BEGIN android-changed
        value = DERNull.THE_ONE;
        // END android-changed
    
public CertStatus(RevokedInfo info)

        tagNo = 1;
        value = info;
    
public CertStatus(int tagNo, org.bouncycastle.asn1.DEREncodable value)

        this.tagNo = tagNo;
        this.value = value;
    
public CertStatus(org.bouncycastle.asn1.ASN1TaggedObject choice)

        this.tagNo = choice.getTagNo();

        switch (choice.getTagNo())
        {
        case 0:
            // BEGIN android-changed
            value = DERNull.THE_ONE;
            // END android-changed
            break;
        case 1:
            value = RevokedInfo.getInstance(choice, false);
            break;
        case 2:
            // BEGIN android-changed
            value = DERNull.THE_ONE;
            // END android-changed
        }
    
Methods Summary
public static org.bouncycastle.asn1.ocsp.CertStatusgetInstance(java.lang.Object obj)

        if (obj == null || obj instanceof CertStatus)
        {
            return (CertStatus)obj;
        }
        else if (obj instanceof ASN1TaggedObject)
        {
            return new CertStatus((ASN1TaggedObject)obj);
        }

        throw new IllegalArgumentException("unknown object in factory");
    
public static org.bouncycastle.asn1.ocsp.CertStatusgetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

        return getInstance(obj.getObject()); // must be explicitly tagged
    
public org.bouncycastle.asn1.DEREncodablegetStatus()

        return value;
    
public intgetTagNo()

        return tagNo;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
CertStatus ::= CHOICE {
good [0] IMPLICIT NULL,
revoked [1] IMPLICIT RevokedInfo,
unknown [2] IMPLICIT UnknownInfo }

        return new DERTaggedObject(false, tagNo, value);