FileDocCategorySizeDatePackage
SigningCertificate.javaAPI DocAndroid 1.5 API2846Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.ess

SigningCertificate

public class SigningCertificate extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
org.bouncycastle.asn1.ASN1Sequence
certs
org.bouncycastle.asn1.ASN1Sequence
policies
Constructors Summary
public SigningCertificate(org.bouncycastle.asn1.ASN1Sequence seq)
constructeurs

        if (seq.size() < 1 || seq.size() > 2)
        {
            throw new IllegalArgumentException("Bad sequence size: "
                    + seq.size());
        }
        this.certs = ASN1Sequence.getInstance(seq.getObjectAt(0));
        
        if (seq.size() > 1)
        {
            this.policies = ASN1Sequence.getInstance(seq.getObjectAt(1));
        }
    
public SigningCertificate(ESSCertID essCertID)

        certs = new DERSequence(essCertID);
    
Methods Summary
public ESSCertID[]getCerts()

        ESSCertID[] cs = new ESSCertID[certs.size()];
        
        for (int i = 0; i != certs.size(); i++)
        {
            cs[i] = ESSCertID.getInstance(certs.getObjectAt(i));
        }
        
        return cs;
    
public static org.bouncycastle.asn1.ess.SigningCertificategetInstance(java.lang.Object o)

        if (o == null || o instanceof SigningCertificate)
        {
            return (SigningCertificate) o;
        }
        else if (o instanceof ASN1Sequence)
        {
            return new SigningCertificate((ASN1Sequence) o);
        }

        throw new IllegalArgumentException(
                "unknown object in 'SigningCertificate' factory : "
                        + o.getClass().getName() + ".");
    
public org.bouncycastle.asn1.x509.PolicyInformation[]getPolicies()

        if (policies == null)
        {
            return null;
        }
        
        PolicyInformation[] ps = new PolicyInformation[policies.size()];
        
        for (int i = 0; i != policies.size(); i++)
        {
            ps[i] = PolicyInformation.getInstance(policies.getObjectAt(i));
        }
        
        return ps;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
The definition of SigningCertificate is
SigningCertificate ::= SEQUENCE {
certs SEQUENCE OF ESSCertID,
policies SEQUENCE OF PolicyInformation OPTIONAL
}
id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) id-aa(2) 12 }

        ASN1EncodableVector v = new ASN1EncodableVector();

        v.add(certs);
        
        if (policies != null)
        {
            v.add(policies);
        }
        
        return new DERSequence(v);