public CertificateFactory getCertificateFactory(String type) throws NoSuchProviderException, CertificateException { return createCertificateFactory(type); }
/** * Use the configured converter to produce a X509Certificate object from a X509CertificateHolder object. * * @param certHolder the holder to be converted * @return a X509Certificate object * @throws CertificateException if the conversion is unable to be made. */ public X509Certificate getCertificate(X509CertificateHolder certHolder) throws CertificateException { try { CertificateFactory cFact = helper.getCertificateFactory("X.509"); return (X509Certificate)cFact.generateCertificate(new ByteArrayInputStream(certHolder.getEncoded())); } catch (IOException e) { throw new ExCertificateParsingException("exception parsing certificate: " + e.getMessage(), e); } catch (NoSuchProviderException e) { throw new ExCertificateException("cannot find required provider:" + e.getMessage(), e); } }
/** * Use the configured converter to produce a X509Certificate object from a X509CertificateHolder object. * * @param certHolder the holder to be converted * @return a X509Certificate object * @throws CertificateException if the conversion is unable to be made. */ public X509Certificate getCertificate(X509CertificateHolder certHolder) throws CertificateException { try { CertificateFactory cFact = helper.getCertificateFactory("X.509"); return (X509Certificate)cFact.generateCertificate(new ByteArrayInputStream(certHolder.getEncoded())); } catch (IOException e) { throw new ExCertificateParsingException("exception parsing certificate: " + e.getMessage(), e); } catch (NoSuchProviderException e) { throw new ExCertificateException("cannot find required provider:" + e.getMessage(), e); } }
/** * Use the configured converter to produce a X509CRL object from a X509CRLHolder object. * * @param crlHolder the holder to be converted * @return a X509CRL object * @throws CRLException if the conversion is unable to be made. */ public X509CRL getCRL(X509CRLHolder crlHolder) throws CRLException { try { CertificateFactory cFact = helper.getCertificateFactory("X.509"); return (X509CRL)cFact.generateCRL(new ByteArrayInputStream(crlHolder.getEncoded())); } catch (IOException e) { throw new ExCRLException("exception parsing certificate: " + e.getMessage(), e); } catch (NoSuchProviderException e) { throw new ExCRLException("cannot find required provider:" + e.getMessage(), e); } catch (CertificateException e) { throw new ExCRLException("cannot create factory: " + e.getMessage(), e); } }
public CertificateFactory getCertificateFactory(String type) throws NoSuchProviderException, CertificateException { return createCertificateFactory(type); }
/** * Use the configured converter to produce a X509CRL object from a X509CRLHolder object. * * @param crlHolder the holder to be converted * @return a X509CRL object * @throws CRLException if the conversion is unable to be made. */ public X509CRL getCRL(X509CRLHolder crlHolder) throws CRLException { try { CertificateFactory cFact = helper.getCertificateFactory("X.509"); return (X509CRL)cFact.generateCRL(new ByteArrayInputStream(crlHolder.getEncoded())); } catch (IOException e) { throw new ExCRLException("exception parsing certificate: " + e.getMessage(), e); } catch (NoSuchProviderException e) { throw new ExCRLException("cannot find required provider:" + e.getMessage(), e); } catch (CertificateException e) { throw new ExCRLException("cannot create factory: " + e.getMessage(), e); } }