if (pst.isSetUrl()) { return createTrustStore(new URL(pst.getUrl()).openStream(), type);
/** * This method converts a JAXB generated CertStoreType into a KeyStore. */ public static KeyStore getKeyStore(final CertStoreType pst) throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException { if (pst == null) { return null; } if (pst.isSetFile()) { return createTrustStore(new FileInputStream(pst.getFile())); } if (pst.isSetResource()) { final java.io.InputStream is = getResourceAsStream(pst.getResource()); if (is == null) { final String msg = "Could not load truststore resource " + pst.getResource(); LOG.severe(msg); throw new java.io.IOException(msg); } return createTrustStore(is); } if (pst.isSetUrl()) { return createTrustStore(new URL(pst.getUrl()).openStream()); } // TODO error? return null; }
if (pst.isSetUrl()) { return createTrustStore(new URL(pst.getUrl()).openStream(), type);
/** * This method converts a JAXB generated CertStoreType into a KeyStore. */ public static KeyStore getKeyStore(final CertStoreType pst) throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException { if (pst == null) { return null; } if (pst.isSetFile()) { return createTrustStore(new FileInputStream(pst.getFile())); } if (pst.isSetResource()) { final java.io.InputStream is = getResourceAsStream(pst.getResource()); if (is == null) { final String msg = "Could not load truststore resource " + pst.getResource(); LOG.severe(msg); throw new java.io.IOException(msg); } return createTrustStore(is); } if (pst.isSetUrl()) { return createTrustStore(new URL(pst.getUrl()).openStream()); } // TODO error? return null; }