Examples of generateCRL()


Examples of java.security.cert.CertificateFactory.generateCRL()

        cert = (X509Certificate)cf.generateCertificate(new ByteArrayInputStream(info.getEncoded()));
        if (cert != null)
        {
            fail("PKCS7 cert present");
        }
        crl = (X509CRL)cf.generateCRL(new ByteArrayInputStream(info.getEncoded()));
        if (crl != null)
        {
            fail("PKCS7 crl present");
        }
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        cert = (X509Certificate)cf.generateCertificate(new ByteArrayInputStream(info.getEncoded()));
        if (cert != null)
        {
            fail("PKCS7 cert present");
        }
        crl = (X509CRL)cf.generateCRL(new ByteArrayInputStream(info.getEncoded()));
        if (crl != null)
        {
            fail("PKCS7 crl present");
        }
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        {
            InputStream in = new FileInputStream(getPkitsHome() + "/crls/" + crlName + ".crl");
           
            CertificateFactory fact = CertificateFactory.getInstance("X.509", "BC");
           
            crl = (X509CRL)fact.generateCRL(in);
           
            crls.put(crlName, crl);
           
            return crl;
        }
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        {
            InputStream in = new FileInputStream(getPkitsHome() + "/crls/" + crlName + ".crl");
           
            CertificateFactory fact = CertificateFactory.getInstance("X.509", "BC");
           
            crl = (X509CRL)fact.generateCRL(in);
           
            crls.put(crlName, crl);
           
            return crl;
        }
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        CertificateFactory factory = CertificateFactory.getInstance("X.509");

        ByteArrayInputStream bais = new ByteArrayInputStream(
                Base64.decode(pkcs7so.getBytes("UTF-8")));
        try {
            factory.generateCRL(bais);
            fail("Expected exception was not thrown");
        } catch (Exception e) { }
        bais = new ByteArrayInputStream(Base64.decode(pkcs7so.getBytes("UTF-8")));
        try {
            factory.generateCertificate(bais);
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

       
        for (int i=0; i<good.length; i++) {
            bais = new ByteArrayInputStream(
                    (good[i][0] + x509crl + good[i][1]).getBytes("UTF-8"));

            X509CRL crl = (X509CRL) factory.generateCRL(bais);
            assertNotNull("Factory returned null on correct data", crl);

            if (publicKey != null) {
                // verify the signatures
                crl.verify(publicKey);
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        for (int i=0; i<bad_content.length; i++) {
            bais = new ByteArrayInputStream(
                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
            try {
                factory.generateCRL(bais);
                fail("Expected exception was not thrown");
            } catch (Exception e) {
                // e.printStackTrace();
            }
        }
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        for (int i=0; i<bad.length; i++) {
            bais = new ByteArrayInputStream(
                    (bad[i][0] + x509crl + bad[i][1]).getBytes("UTF-8"));
            try {
                factory.generateCRL(bais);
                fail("Expected exception was not thrown");
            } catch (Exception e) { }
        }
    }
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

            crlLocation = crlLocation.trim();
            InputStream is = loadInputStream(loader, crlLocation);

            try {
                CertificateFactory cf = getCertificateFactory();
                X509CRL crl = (X509CRL)cf.generateCRL(is);
               
                if (provider == null || provider.length() == 0) {
                    crlCertStore =
                        CertStore.getInstance(
                            "Collection",
View Full Code Here

Examples of java.security.cert.CertificateFactory.generateCRL()

        }

        // Download the CRL data from URL.
        InputStream stream = (new URL(url)).openStream();
        CertificateFactory factory = CertificateFactory.getInstance("X.509");
        crl = (X509CRL) factory.generateCRL(stream);
        stream.close();

        // Add CRL to memory cache.
        if (crlCache.size() >= CRL_CACHE_SIZE) {
            crlCache.remove(crlCache.keySet().iterator().next());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.