Package org.apache.harmony.security.x509

Examples of org.apache.harmony.security.x509.CertificateList


     * all functionality will be tested.
     * @return
     * @throws java.lang.Exception
     */
    protected void setUp() throws java.lang.Exception {
        AlgorithmIdentifier signature =
            new AlgorithmIdentifier(algOID, algParams);
        Name issuer = new Name(issuerName);
        Name subject = new Name(subjectName);
        Validity validity =
            new Validity(new Date(notBefore), new Date(notAfter));

View Full Code Here


            signatureValue[20]++;
        } else {
            signatureValue = signatureValueBytes;
        }
       
        Certificate cert =
            new Certificate(tbsCertificate, signature, signatureValue);

        certEncoding = cert.getEncoded();

        cert = (Certificate) Certificate.ASN1.decode(certEncoding);
        certificate = new X509CertImpl(cert);
    }
View Full Code Here

            signatureValue[20]++;
        } else {
            signatureValue = signatureValueBytes;
        }
        certificateList =
            new CertificateList(tbscertlist, signature, signatureValue);

        encoding = CertificateList.ASN1.encode(certificateList);
        stream = new ByteArrayInputStream(encoding);

        crl = new X509CRLImpl(certificateList);
View Full Code Here

            tbscertlist =
                new TBSCertList(2, signature, issuer, thisUpdate,
                    nextUpdate, revokedCertificates, crlExtensions);
           
            certificateList =
                new CertificateList(tbscertlist, signature, signatureValue);

            encoding = CertificateList.ASN1.encode(certificateList);

            certificateList = (CertificateList)
                CertificateList.ASN1.decode(encoding);
View Full Code Here

            AlgorithmIdentifier signature =
                new AlgorithmIdentifier(algOID, algParams);
            Name issuer = new Name(issuerName);
            TBSCertList tbscl =
                new TBSCertList(signature, issuer, thisUpdate);
            CertificateList cl =
                new CertificateList(tbscl, signature, new byte[] {0});
           
            byte[] encoding = CertificateList.ASN1.encode(cl);
            CertificateList.ASN1.decode(encoding);

            tbscl = new TBSCertList(2, signature, issuer, thisUpdate,
                    nextUpdate, revokedCertificates, crlExtensions);
           
            cl = new CertificateList(tbscl, signature, new byte[] {0});

            encoding = CertificateList.ASN1.encode(cl);
            CertificateList.ASN1.decode(encoding);

        } catch (IOException e) {
View Full Code Here

            signatureValue[20]++;
        } else {
            signatureValue = signatureValueBytes;
        }
        certificateList =
            new CertificateList(tbscertlist, signature, signatureValue);

        encoding = CertificateList.ASN1.encode(certificateList);
        stream = new ByteArrayInputStream(encoding);

        crl = new X509CRLImpl(certificateList);
View Full Code Here

            tbscertlist =
                new TBSCertList(2, signature, issuer, thisUpdate,
                    nextUpdate, revokedCertificates, crlExtensions);
           
            certificateList =
                new CertificateList(tbscertlist, signature, signatureValue);

            encoding = CertificateList.ASN1.encode(certificateList);

            certificateList = (CertificateList)
                CertificateList.ASN1.decode(encoding);
View Full Code Here

            AlgorithmIdentifier signature =
                new AlgorithmIdentifier(algOID, algParams);
            Name issuer = new Name(issuerName);
            TBSCertList tbscl =
                new TBSCertList(signature, issuer, thisUpdate);
            CertificateList cl =
                new CertificateList(tbscl, signature, new byte[] {0});
           
            byte[] encoding = CertificateList.ASN1.encode(cl);
            CertificateList.ASN1.decode(encoding);

            tbscl = new TBSCertList(2, signature, issuer, thisUpdate,
                    nextUpdate, revokedCertificates, crlExtensions);
           
            cl = new CertificateList(tbscl, signature, new byte[] {0});

            encoding = CertificateList.ASN1.encode(cl);
            CertificateList.ASN1.decode(encoding);

        } catch (IOException e) {
View Full Code Here

            signatureValue[20]++;
        } else {
            signatureValue = signatureValueBytes;
        }
        certificateList =
            new CertificateList(tbscertlist, signature, signatureValue);

        encoding = CertificateList.ASN1.encode(certificateList);
        stream = new ByteArrayInputStream(encoding);

        crl = new X509CRLImpl(certificateList);
View Full Code Here

            String[] policies = new String[] {
                "0.0.0.0.0.0",
                "1.1.1.1.1.1",
                "2.2.2.2.2.2"
            };
            CertificatePolicies certificatePolicies =
                                            new CertificatePolicies();
            for (int i=0; i<policies.length; i++) {
                PolicyInformation policyInformation =
                                        new PolicyInformation(policies[i]);
                certificatePolicies.addPolicyInformation(policyInformation);
            }

            byte[] encoding = certificatePolicies.getEncoded();
            List policyInformations = ((CertificatePolicies)
                    CertificatePolicies.ASN1.decode(encoding))
                    .getPolicyInformations();
            Iterator it = policyInformations.iterator();
            ((PolicyInformation) it.next()).getPolicyIdentifier();
View Full Code Here

TOP

Related Classes of org.apache.harmony.security.x509.CertificateList

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.