private Collection<? extends CRL> getCRLs(InputStream crlStream) throws GeneralSecurityException { CertificateFactory cf = CertificateFactory.getInstance("X.509"); try { return cf.generateCRLs(crlStream); } finally { try { crlStream.close(); } catch (Exception ignore) {} } } }
private static Collection<? extends CRL> loadCRL(String crlPath) throws Exception { if (crlPath == null) { return null; } URL resource = SSLSupport.validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
crls.addAll( (Collection<X509CRL>) certificateFactory.generateCRLs( input ) );
ArrayList<CRL> crls = new ArrayList<>(); for (Buffer crlValue : tmp.collect(Collectors.toList())) { crls.addAll(certificatefactory.generateCRLs(new ByteArrayInputStream(crlValue.getBytes())));
private Collection<? extends CRL> loadCRL(String crlPath) throws CertificateException, IOException, CRLException { Collection<? extends CRL> crlList = null; if (crlPath != null) { InputStream in = null; try { in = IOUtils.getResourceAsStream(crlPath, getClass()); crlList = CertificateFactory.getInstance("X.509").generateCRLs(in); } finally { if (in != null) { in.close(); } } } return crlList; }
/** * Load the collection of CRLs. */ protected Collection<? extends CRL> getCRLs(String crlf) throws IOException, CRLException, CertificateException { File crlFile = new File(crlf); if (!crlFile.isAbsolute()) { crlFile = new File(System.getProperty("catalina.base"), crlf); } Collection<? extends CRL> crls = null; InputStream is = null; try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); is = new FileInputStream(crlFile); crls = cf.generateCRLs(is); } finally { if (is != null) { try { is.close(); } catch (Exception ignored) { } } } return crls; }
@SuppressWarnings({"rawtypes", "unchecked"}) public static CRL[] createCRL(String crlfile) { InputStream is = null; try { CertificateFactory cf = CertificateFactory.getInstance("X.509"); is = new FileInputStream(crlfile); Collection c = cf.generateCRLs(is); CRL[] crls = (CRL[]) c.toArray(new CRL[c.size()]); return crls; } catch (CertificateException e) { throw new IllegalArgumentException("bad cert file."); } catch (FileNotFoundException e) { throw new IllegalArgumentException("crl file not found."); } catch (CRLException e) { throw new IllegalArgumentException("bad crl file."); } finally { if (is != null) { try { is.close(); } catch (IOException e) { ignore(); } } } }
public static Collection<? extends CRL> loadCRL(String crlPath) throws Exception { Collection<? extends CRL> crlList = null; if (crlPath != null) { InputStream in = null; try { in = Resource.newResource(crlPath).getInputStream(); crlList = CertificateFactory.getInstance("X.509").generateCRLs(in); } finally { if (in != null) { in.close(); } } } return crlList; }
ArrayList<CRL> crls = new ArrayList<>(); for (Buffer crlValue : tmp.collect(Collectors.toList())) { crls.addAll(certificatefactory.generateCRLs(new ByteArrayInputStream(crlValue.getBytes())));
private Collection<? extends CRL> getCRLs(InputStream crlStream) throws GeneralSecurityException { CertificateFactory cf = CertificateFactory.getInstance("X.509"); try { return cf.generateCRLs(crlStream); } finally { try { crlStream.close(); } catch (Exception ignore) {} } } }
private Collection<? extends CRL> loadCRL() throws IOException, CertificateException, CRLException { try (InputStream in = Files.newInputStream(crl, StandardOpenOption.READ)) { crlLastLoadedTimestamp = crl.toFile().lastModified(); return certificateFactory.generateCRLs(in); } }
private Collection<? extends CRL> loadCRL() throws Exception { if (crlPath == null) { return null; } URL resource = validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
private Collection<? extends CRL> loadCRL() throws Exception { if (crlPath == null) { return null; } URL resource = validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
private Collection<? extends CRL> loadCRL() throws Exception { if (crlPath == null) { return null; } URL resource = validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
private Collection<? extends CRL> loadCRL() throws Exception { if (crlPath == null) { return null; } Resource resource = Utils.resourceFromString(crlPath); InputStream is = resource.getInputStream(); try { return CertificateFactory.getInstance("X.509").generateCRLs(is); } finally { is.close(); } }
private static Collection<? extends CRL> loadCRL(String crlPath) throws Exception { if (crlPath == null) { return null; } URL resource = SSLSupport.validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
private static Collection<? extends CRL> loadCRL(String crlPath) throws Exception { if (crlPath == null) { return null; } URL resource = SSLSupport.validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
private Collection<? extends CRL> loadCRL() throws Exception { if (crlPath == null) { return null; } Resource resource = Utils.resourceFromString(crlPath); InputStream is = resource.getInputStream(); try { return CertificateFactory.getInstance("X.509").generateCRLs(is); } finally { is.close(); } }
private static Collection<? extends CRL> loadCRL(String crlPath) throws Exception { if (crlPath == null) { return null; } URL resource = SSLSupport.validateStoreURL(crlPath); try (InputStream is = resource.openStream()) { return CertificateFactory.getInstance("X.509").generateCRLs(is); } }
private Collection<? extends CRL> loadCRL() throws Exception { if (crlPath == null) { return null; } Resource resource = Utils.resourceFromString(crlPath); InputStream is = resource.getInputStream(); try { return CertificateFactory.getInstance("X.509").generateCRLs(is); } finally { is.close(); } }