FileDocCategorySizeDatePackage
CertificationRequestInfo.javaAPI DocAzureus 3.0.3.43664Tue Jun 08 05:12:58 BST 2004org.bouncycastle.asn1.pkcs

CertificationRequestInfo

public class CertificationRequestInfo extends Object implements org.bouncycastle.asn1.DEREncodable
PKCS10 CertificationRequestInfo object.
CertificationRequestInfo ::= SEQUENCE {
version INTEGER { v1(0) } (v1,...),
subject Name,
subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
attributes [0] Attributes{{ CRIAttributes }}
}

Attributes { ATTRIBUTE:IOSet } ::= SET OF Attribute{{ IOSet }}

Attribute { ATTRIBUTE:IOSet } ::= SEQUENCE {
type ATTRIBUTE.&id({IOSet}),
values SET SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
}

Fields Summary
org.bouncycastle.asn1.DERInteger
version
org.bouncycastle.asn1.x509.X509Name
subject
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
subjectPKInfo
org.bouncycastle.asn1.ASN1Set
attributes
Constructors Summary
public CertificationRequestInfo(org.bouncycastle.asn1.x509.X509Name subject, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo pkInfo, org.bouncycastle.asn1.ASN1Set attributes)

        this.subject = subject;
        this.subjectPKInfo = pkInfo;
        this.attributes = attributes;

        if ((subject == null) || (version == null) || (subjectPKInfo == null))
        {
            throw new IllegalArgumentException("Not all mandatory fields set in CertificationRequestInfo generator.");
        }
    
public CertificationRequestInfo(org.bouncycastle.asn1.ASN1Sequence seq)

        version = (DERInteger)seq.getObjectAt(0);

        subject = X509Name.getInstance(seq.getObjectAt(1));
        subjectPKInfo = SubjectPublicKeyInfo.getInstance(seq.getObjectAt(2));

        //
        // some CertificationRequestInfo objects seem to treat this field
        // as optional.
        //
        if (seq.size() > 3)
        {
            DERTaggedObject tagobj = (DERTaggedObject)seq.getObjectAt(3);
            attributes = ASN1Set.getInstance(tagobj, false);
        }

        if ((subject == null) || (version == null) || (subjectPKInfo == null))
        {
            throw new IllegalArgumentException("Not all mandatory fields set in CertificationRequestInfo generator.");
        }
    
Methods Summary
public org.bouncycastle.asn1.ASN1SetgetAttributes()

        return attributes;
    
public org.bouncycastle.asn1.DERObjectgetDERObject()

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(version);
        v.add(subject);
        v.add(subjectPKInfo);

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

        return new DERSequence(v);
    
public static org.bouncycastle.asn1.pkcs.CertificationRequestInfogetInstance(java.lang.Object obj)


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

        throw new IllegalArgumentException("unknown object in factory");
    
public org.bouncycastle.asn1.x509.X509NamegetSubject()

        return subject;
    
public org.bouncycastle.asn1.x509.SubjectPublicKeyInfogetSubjectPublicKeyInfo()

        return subjectPKInfo;
    
public org.bouncycastle.asn1.DERIntegergetVersion()

        return version;