Package java.security.cert

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


  String fs = System.getProperty("file.separator");
  FileInputStream fis = new FileInputStream
      (System.getProperty("basedir") + fs + "data" + fs + "ie" + fs +
       "baltimore" + fs + "merlin-examples" + fs +
       "merlin-xmldsig-twenty-three" + fs + "certs" + fs + "crl");
  X509CRL crl = (X509CRL) cf.generateCRL(fis);
  fis.close();
  xds.add(crl);
  KeyInfo crt_crl = kifac.newKeyInfo(Collections.singletonList
            (kifac.newX509Data(xds)));
View Full Code Here


  String fs = System.getProperty("file.separator");
  FileInputStream fis = new FileInputStream
      (System.getProperty("basedir") + fs + "data" + fs + "ie" + fs +
       "baltimore" + fs + "merlin-examples" + fs +
       "merlin-xmldsig-twenty-three" + fs + "certs" + fs + "crl");
  X509CRL crl = (X509CRL) cf.generateCRL(fis);
  fis.close();
  xds.add(crl);
  KeyInfo crt_crl = kifac.newKeyInfo(Collections.singletonList
            (kifac.newX509Data(xds)));
View Full Code Here

   
    private void loadCRL(File crlFile) throws AuthenticationException {
        try {
            CertificateFactory certificatefactory = CertificateFactory.getInstance("X.509");
            FileInputStream fin = new FileInputStream(crlFile);
            _currentCRL = (X509CRL) certificatefactory.generateCRL(fin);
            _currentCRLLastModified = crlFile.lastModified();
            fin.close();
        }
        catch (Exception e) {
            String message = "Could not load CRL '" + crlFile.getPath() + "'";
View Full Code Here

                conn.setDoInput(true);
                conn.connect();
                if (conn.getResponseCode() == HttpURLConnection.HTTP_OK)
                {
                    CertificateFactory cf = CertificateFactory.getInstance("X.509","BC");
                    result = (X509CRL) cf.generateCRL(conn.getInputStream());
                }
                else
                {
                    throw new Exception(conn.getResponseMessage());
                }
View Full Code Here

        {
            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

        //
        // check factory read back
        //
        CertificateFactory cFact = CertificateFactory.getInstance("X.509", "BC");

        X509CRL readCrl = (X509CRL)cFact.generateCRL(new ByteArrayInputStream(newCrl.getEncoded()));

        if (readCrl == null)
        {
            fail("crl not returned!");
        }
View Full Code Here

        Certificate cert = cf.generateCertificate(new ByteArrayInputStream(PEMData.CERTIFICATE_1.getBytes("US-ASCII")));
        if (cert == null)
        {
            fail("PEM cert not read");
        }
        CRL crl = cf.generateCRL(new ByteArrayInputStream(PEMData.CRL_1.getBytes("US-ASCII")));
        if (crl == null)
        {
            fail("PEM crl not read");
        }
        Collection col = cf.generateCertificates(new ByteArrayInputStream(PEMData.CERTIFICATE_2.getBytes("US-ASCII")));
View Full Code Here

        X509Certificate cert = (X509Certificate)cf.generateCertificate(new ByteArrayInputStream(info.getEncoded()));
        if (cert == null || !areEqual(cert.getEncoded(), certs.get(0).getDERObject().getEncoded()))
        {
            fail("PKCS7 cert not read");
        }
        X509CRL crl = (X509CRL)cf.generateCRL(new ByteArrayInputStream(info.getEncoded()));
        if (crl == null || !areEqual(crl.getEncoded(), crls.get(0).getDERObject().getEncoded()))
        {
            fail("PKCS7 crl not read");
        }
        Collection col = cf.generateCertificates(new ByteArrayInputStream(info.getEncoded()));
View Full Code Here

        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

        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

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.