Package org.bouncycastle.asn1.x509

Examples of org.bouncycastle.asn1.x509.V1TBSCertificateGenerator


    /**
     * reset the generator
     */
    public void reset()
    {
        tbsGen = new V1TBSCertificateGenerator();
    }
View Full Code Here


    private AlgorithmIdentifier         sigAlgId;
    private String                      signatureAlgorithm;

    public X509V1CertificateGenerator()
    {
        tbsGen = new V1TBSCertificateGenerator();
    }
View Full Code Here

    /**
     * reset the generator
     */
    public void reset()
    {
        tbsGen = new V1TBSCertificateGenerator();
    }
View Full Code Here

   
    private TestResult tbsV1CertGen()
    {
        try
        {
            V1TBSCertificateGenerator   gen = new V1TBSCertificateGenerator();
            Date                        startDate = new Date(1000);
            Date                        endDate = new Date(12000);
           
            gen.setSerialNumber(new DERInteger(1));
           
            gen.setStartDate(new Time(startDate));
            gen.setEndDate(new Time(endDate));
           
            gen.setIssuer(new X509Name("CN=AU,O=Bouncy Castle"));
            gen.setSubject(new X509Name("CN=AU,O=Bouncy Castle,OU=Test 1"));
           
            gen.setSignature(new AlgorithmIdentifier(PKCSObjectIdentifiers.md5WithRSAEncryption, new DERNull()));
           
            SubjectPublicKeyInfo    info = new SubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.rsaEncryption, new DERNull()),
                                                         new RSAPublicKeyStructure(BigInteger.valueOf(1), BigInteger.valueOf(2)));
           
            gen.setSubjectPublicKeyInfo(info);
           
            TBSCertificateStructure     tbs = gen.generateTBSCertificate();
            ByteArrayOutputStream       bOut = new ByteArrayOutputStream();
            ASN1OutputStream            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(tbs);
           
View Full Code Here

    /**
     * reset the generator
     */
    public void reset()
    {
        tbsGen = new V1TBSCertificateGenerator();
    }
View Full Code Here

    private AlgorithmIdentifier         sigAlgId;
    private String                      signatureAlgorithm;

    public X509V1CertificateGenerator()
    {
        tbsGen = new V1TBSCertificateGenerator();
    }
View Full Code Here

    public X509V2CRLGenerator()
    {
        dateF.setTimeZone(tz);

        tbsGen = new V2TBSCertListGenerator();
    }
View Full Code Here

    /**
     * reset the generator
     */
    public void reset()
    {
        tbsGen = new V2TBSCertListGenerator();
    }
View Full Code Here

    algorithms.put("ECDSAWITHSHA1", new DERObjectIdentifier("1.2.840.10045.4.1"));
    }

    public X509V3CertificateGenerator()
    {
        tbsGen = new V3TBSCertificateGenerator();
    }
View Full Code Here

    /**
     * reset the generator
     */
    public void reset()
    {
        tbsGen = new V3TBSCertificateGenerator();
        extensions = null;
        extOrdering = null;
    }
View Full Code Here

TOP

Related Classes of org.bouncycastle.asn1.x509.V1TBSCertificateGenerator

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.