Examples of CRL


Examples of java.security.cert.CRL

                if (encoding.length < CRL_CACHE_SEED_LENGTH) {
                    throw new CRLException(
                        Messages.getString("security.15B4")); //$NON-NLS-1$
                }
                inStream.read(encoding);
                CRL res = (CRL) CRL_CACHE.get(hash, encoding);
                if (res != null) {
                    return res;
                }
                res = new X509CRLImpl(encoding);
                CRL_CACHE.put(hash, encoding, res);
                return res;
            } else {
                X509CRL res = new X509CRLImpl(inStream);
                CRL_CACHE.put(hash, res.getEncoded(), res);
                return res;
            }
        }
    }
View Full Code Here

Examples of java.security.cert.CRL

        {
            bIn = new ByteArrayInputStream(bytes);

            CertificateFactory  fact = CertificateFactory.getInstance("X.509", "BC");

            CRL cert = fact.generateCRL(bIn);

            // System.out.println(cert);
        }
        catch (Exception e)
        {
View Full Code Here

Examples of java.security.cert.CRL

        CertificateFactory fact = CertificateFactory.getInstance("X.509");
        for (int i = 0; i < CRL_URLS.length; i++) {
            URL certUrl = new URL(BASE_URL + CRL_URLS[i]);
            try {
                InputStream is = certUrl.openStream();
                CRL crl = fact.generateCRL(is);
                assertNotNull("The CRL in \"" + certUrl.toExternalForm()
                        + "\" were not parsed correctly", crl);
            } catch (IOException e) {
                // the certificate could not be found, skip it
            } catch (CRLException e) {
View Full Code Here

Examples of java.security.cert.CRL

    /**
     * Test #1 for <code>getType()</code> method<br>
     * Assertion: returns <code>CRL</code> type
     */
    public final void testGetType01() {
        CRL crl = new MyCRL("TEST_TYPE");
        assertEquals("TEST_TYPE", crl.getType());
    }
View Full Code Here

Examples of java.security.cert.CRL

    /**
     * Test #2 for <code>getType()</code> method<br>
     * Assertion: returns <code>CRL</code> type
     */
    public final void testGetType02() {
        CRL crl = new MyCRL(null);
        assertNull(crl.getType());
    }
View Full Code Here

Examples of java.security.cert.CRL

    /**
     * Test for <code>toString()</code> method
     */
    public final void testToString() {
        CRL crl = new MyCRL("TEST_TYPE");
        crl.toString();
    }
View Full Code Here

Examples of java.security.cert.CRL

    /**
     * Test for <code>isRevoked()</code> method
     */
    public final void testIsRevoked() {
        CRL crl = new MyCRL("TEST_TYPE");
        crl.isRevoked(null);
    }
View Full Code Here

Examples of java.security.cert.CRL

        oos.flush();
        oos.close();

        Certificate cer;
        Collection colCer;
        CRL crl;
        Collection colCrl;

        byte[] arr = os.toByteArray();
        ByteArrayInputStream is;
        for (int i = 0; i < certFs.length; i++) {
View Full Code Here

Examples of java.security.cert.CRL

        try {
            certFactory.generateCRLs(null);
            fail("CRLException must be thrown");
        } catch (CRLException e) {
        }
        CRL crl = certFactory.generateCRL(dis);
        assertNull("Result must be null", crl);
        col = certFactory.generateCRLs(dis);
        assertNull("Result must be null", col);

        List list = null;
View Full Code Here

Examples of java.security.cert.CRL

    /**
     * engineGenerateCRL(InputStream inStream) method testing.
     */
    public void testEngineGenerateCRL() throws Exception {
        X509CertFactoryImpl certFactory = new X509CertFactoryImpl();
        CRL crl;
       
        // DER encoded crt generation testing
        ByteArrayInputStream bais =
            new ByteArrayInputStream(
                    CertFactoryTestData.getCRLEncoding());
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.