Package org.apache.geronimo.util.asn1.pkcs

Examples of org.apache.geronimo.util.asn1.pkcs.CertificationRequestInfo


        // The password attribute can be either a pkcs_9_at_challengePassword directly
        // or
        // a pkcs_9_at_extensionRequest containing a pkcs_9_at_challengePassword as a
        // X509Extension.
        AttributeTable attributes = null;
        CertificationRequestInfo info = pkcs10.getCertificationRequestInfo();
        if (info != null) {
          ASN1Set attrs = info.getAttributes();
          if (attrs != null) {
            attributes = new AttributeTable(attrs);   
          }
        }
        if (attributes == null) {
View Full Code Here


            log.error("PKCS10 not inited!");
            return null;
        }
        X509Name ret = null;
        // Get subject name from request
        CertificationRequestInfo info = pkcs10.getCertificationRequestInfo();
        if (info != null) {
            ret = info.getSubject();
        }
        return ret;
    }
View Full Code Here

        X509Extensions ret = null;

        // Get attributes
        // The X509 extension is in a a pkcs_9_at_extensionRequest
        AttributeTable attributes = null;
        CertificationRequestInfo info = pkcs10.getCertificationRequestInfo();
        if (info != null) {
          ASN1Set attrs = info.getAttributes();
          if (attrs != null) {
            attributes = new AttributeTable(attrs);   
          }
        }
        if (attributes != null) {
View Full Code Here

        ByteArrayInputStream    bIn = new ByteArrayInputStream(bytes);
        ASN1InputStream         dIn = new ASN1InputStream(bIn);

        try
        {
            this.reqInfo = new CertificationRequestInfo(subject, new SubjectPublicKeyInfo((ASN1Sequence)dIn.readObject()), attributes);
        }
        catch (IOException e)
        {
            throw new IllegalArgumentException("can't encode public key");
        }
View Full Code Here

        }

        try
        {
            ASN1Sequence seq = (ASN1Sequence)ASN1Object.fromByteArray(key.getEncoded());
            this.reqInfo = new CertificationRequestInfo(subject, new SubjectPublicKeyInfo(seq), attributes);
        }
        catch (IOException e)
        {
            throw new IllegalArgumentException("can't encode public key");
        }
View Full Code Here

        ByteArrayInputStream    bIn = new ByteArrayInputStream(bytes);
        ASN1InputStream         dIn = new ASN1InputStream(bIn);

        try
        {
            this.reqInfo = new CertificationRequestInfo(subject, new SubjectPublicKeyInfo((ASN1Sequence)dIn.readObject()), attributes);
        }
        catch (IOException e)
        {
            throw new IllegalArgumentException("can't encode public key");
        }
View Full Code Here

        ASN1EncodableVector v1 = new ASN1EncodableVector();
        for(int i=0;i<(seq.size()-1);i++) {
            v1.add(seq.getObjectAt(i));
        }
        v1.add(new DERTaggedObject(0,attrs));
        this.reqInfo = new CertificationRequestInfo(new DERSequence(v1));
    }
View Full Code Here

        ASN1EncodableVector v1 = new ASN1EncodableVector();
        v1.add(nVersion);
        for(int i=1;i<seq.size();i++) {
            v1.add(seq.getObjectAt(i));
        }
        this.reqInfo = new CertificationRequestInfo(new DERSequence(v1));
    }
View Full Code Here

        ByteArrayInputStream    bIn = new ByteArrayInputStream(bytes);
        ASN1InputStream         dIn = new ASN1InputStream(bIn);

        try
        {
            this.reqInfo = new CertificationRequestInfo(subject, new SubjectPublicKeyInfo((ASN1Sequence)dIn.readObject()), attributes);
        }
        catch (IOException e)
        {
            throw new IllegalArgumentException("can't encode public key");
        }
View Full Code Here

        }

        try
        {
            ASN1Sequence seq = (ASN1Sequence)ASN1Object.fromByteArray(key.getEncoded());
            this.reqInfo = new CertificationRequestInfo(subject, new SubjectPublicKeyInfo(seq), attributes);
        }
        catch (IOException e)
        {
            throw new IllegalArgumentException("can't encode public key");
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.util.asn1.pkcs.CertificationRequestInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.