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

ResponderID

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

Fields Summary
private org.bouncycastle.asn1.DEREncodable
value
Constructors Summary
public ResponderID(org.bouncycastle.asn1.ASN1OctetString value)

        this.value = value;
    
public ResponderID(org.bouncycastle.asn1.x509.X509Name value)

        this.value = value;
    
Methods Summary
public static org.bouncycastle.asn1.ocsp.ResponderIDgetInstance(java.lang.Object obj)

        if (obj == null || obj instanceof ResponderID)
        {
            return (ResponderID)obj;
        }
        else if (obj instanceof DEROctetString)
        {
            return new ResponderID((DEROctetString)obj);
        }
        else if (obj instanceof ASN1TaggedObject)
        {
            ASN1TaggedObject    o = (ASN1TaggedObject)obj;

            if (o.getTagNo() == 1)
            {
                return new ResponderID(X509Name.getInstance(o, true));
            }
            else
            {
                return new ResponderID(ASN1OctetString.getInstance(o, true));
            }
        }

        return new ResponderID(X509Name.getInstance(obj));
    
public static org.bouncycastle.asn1.ocsp.ResponderIDgetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

        return getInstance(obj.getObject()); // must be explicitly tagged
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
ResponderID ::= CHOICE {
byName [1] Name,
byKey [2] KeyHash }

        if (value instanceof ASN1OctetString)
        {
            return new DERTaggedObject(true, 2, value);
        }

        return new DERTaggedObject(true, 1, value);