FileDocCategorySizeDatePackage
X509CertificateStructure.javaAPI DocAndroid 1.5 API2973Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.x509

X509CertificateStructure

public class X509CertificateStructure extends org.bouncycastle.asn1.ASN1Encodable implements X509ObjectIdentifiers, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
an X509Certificate structure.
Certificate ::= SEQUENCE {
tbsCertificate TBSCertificate,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}

Fields Summary
org.bouncycastle.asn1.ASN1Sequence
seq
TBSCertificateStructure
tbsCert
AlgorithmIdentifier
sigAlgId
org.bouncycastle.asn1.DERBitString
sig
Constructors Summary
public X509CertificateStructure(org.bouncycastle.asn1.ASN1Sequence seq)

        this.seq = seq;

        //
        // correct x509 certficate
        //
        if (seq.size() == 3)
        {
            tbsCert = TBSCertificateStructure.getInstance(seq.getObjectAt(0));
            sigAlgId = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));

            sig = DERBitString.getInstance(seq.getObjectAt(2));
        }
        else
        {
            throw new IllegalArgumentException("sequence wrong size for a certificate");
        }
    
Methods Summary
public TimegetEndDate()

        return tbsCert.getEndDate();
    
public static org.bouncycastle.asn1.x509.X509CertificateStructuregetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

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

        if (obj instanceof X509CertificateStructure)
        {
            return (X509CertificateStructure)obj;
        }
        else if (obj instanceof ASN1Sequence)
        {
            return new X509CertificateStructure((ASN1Sequence)obj);
        }

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

        return tbsCert.getIssuer();
    
public org.bouncycastle.asn1.DERIntegergetSerialNumber()

        return tbsCert.getSerialNumber();
    
public org.bouncycastle.asn1.DERBitStringgetSignature()

        return sig;
    
public AlgorithmIdentifiergetSignatureAlgorithm()

        return sigAlgId;
    
public TimegetStartDate()

        return tbsCert.getStartDate();
    
public X509NamegetSubject()

        return tbsCert.getSubject();
    
public SubjectPublicKeyInfogetSubjectPublicKeyInfo()

        return tbsCert.getSubjectPublicKeyInfo();
    
public TBSCertificateStructuregetTBSCertificate()

        return tbsCert;
    
public intgetVersion()

        return tbsCert.getVersion();
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()

        return seq;