use of com.notnoop.exceptions.InvalidSSLConfig in project java-apns by notnoop.
the class SSLContextBuilder method withTrustKeyStore.
public SSLContextBuilder withTrustKeyStore(InputStream keyStoreStream, String keyStorePassword, String keyStoreType) throws InvalidSSLConfig {
try {
final KeyStore ks = KeyStore.getInstance(keyStoreType);
ks.load(keyStoreStream, keyStorePassword.toCharArray());
return withTrustKeyStore(ks, keyStorePassword);
} catch (GeneralSecurityException e) {
throw new InvalidSSLConfig(e);
} catch (IOException e) {
throw new InvalidSSLConfig(e);
}
}
Aggregations