Package org.apache.harmony.security.x509

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


                                                    && (policies.length > 0)) {
                //  Certificate Policies Extension (as specified in rfc 3280)
                CertificatePolicies certificatePolicies =
                                                new CertificatePolicies();
                for (int i=0; i<policies.length; i++) {
                    PolicyInformation policyInformation =
                                            new PolicyInformation(policies[i]);
                    certificatePolicies.addPolicyInformation(policyInformation);
                }
                return ASN1OctetString.getInstance().encode(
                            certificatePolicies.getEncoded());
            }
View Full Code Here


                                                    && (policies.length > 0)) {
                //  Certificate Policies Extension (as specified in rfc 3280)
                CertificatePolicies certificatePolicies =
                                                new CertificatePolicies();
                for (int i=0; i<policies.length; i++) {
                    PolicyInformation policyInformation =
                                            new PolicyInformation(policies[i]);
                    certificatePolicies.addPolicyInformation(policyInformation);
                }
                return ASN1OctetString.getInstance().encode(
                            certificatePolicies.getEncoded());
            }
View Full Code Here

            "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)
View Full Code Here

            "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)
View Full Code Here

                                                    && (policies.length > 0)) {
                //  Certificate Policies Extension (as specified in rfc 3280)
                CertificatePolicies certificatePolicies =
                                                new CertificatePolicies();
                for (int i=0; i<policies.length; i++) {
                    PolicyInformation policyInformation =
                                            new PolicyInformation(policies[i]);
                    certificatePolicies.addPolicyInformation(policyInformation);
                }
                return ASN1OctetString.getInstance().encode(
                            certificatePolicies.getEncoded());
            }
View Full Code Here

        Name issuer = new Name(issuerName);
        Name subject = new Name(subjectName);
        Validity validity =
            new Validity(new Date(notBefore), new Date(notAfter));

        SubjectPublicKeyInfo subjectPublicKeyInfo = (SubjectPublicKeyInfo)
            SubjectPublicKeyInfo.ASN1.decode(publicKey.getEncoded());
        keyEncoding = subjectPublicKeyInfo.getEncoded();

        Extensions exts = new Extensions(Arrays.asList(extensions));
      
        TBSCertificate tbsCertificate =
            new TBSCertificate(version, serialNumber,
View Full Code Here

        BigInteger serialNumber = BigInteger.valueOf(555L);
        AlgorithmIdentifier signature = new AlgorithmIdentifier("1.2.3.44.555");
        Name issuer = new Name("O=Certificate Issuer");
        Validity validity = new Validity(new Date(100000000),
                                         new Date(200000000));
        SubjectPublicKeyInfo subjectPublicKeyInfo =
            new SubjectPublicKeyInfo(
                    new AlgorithmIdentifier("1.2.840.113549.1.1.2"),
                                            new byte[10]);
        boolean[] issuerUniqueID  = new boolean[]
                    {true, false, true, false, true, false, true, false};
        boolean[] subjectUniqueID = new boolean[]
View Full Code Here

            SubjectPublicKeyInfo.ASN1.decode(publicKey.getEncoded());
        keyEncoding = subjectPublicKeyInfo.getEncoded();

        Extensions exts = new Extensions(Arrays.asList(extensions));
      
        TBSCertificate tbsCertificate =
            new TBSCertificate(version, serialNumber,
                signature, issuer, validity, subject, subjectPublicKeyInfo,
                issuerUniqueID, subjectUniqueID, exts);
        tbsCertEncoding = tbsCertificate.getEncoded();
      
        if (signatureValueBytes == null) {
            try {
                Signature sig= Signature.getInstance("DSA");//new byte[32];
                sig.initSign(privateKey);
View Full Code Here

        Extension extension = new Extension("2.5.29.17",
                                            true, subjectAltNames.getEncoded());
        Extensions extensions = new Extensions();
        extensions.addExtension(extension);
      
        TBSCertificate tbsCertificate = new TBSCertificate(version,
                serialNumber, signature, issuer, validity, subject,
                subjectPublicKeyInfo, issuerUniqueID, subjectUniqueID,
                extensions);

        // make the Certificate
View Full Code Here

    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));

        SubjectPublicKeyInfo subjectPublicKeyInfo = (SubjectPublicKeyInfo)
            SubjectPublicKeyInfo.ASN1.decode(publicKey.getEncoded());
        keyEncoding = subjectPublicKeyInfo.getEncoded();
View Full Code Here

TOP

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

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.