use of akka.remote.RemoteTransportException in project flink by apache.
the class CustomSSLEngineProvider method trustManagers.
@Override
public TrustManager[] trustManagers() {
try {
final TrustManagerFactory trustManagerFactory = sslCertFingerprints.isEmpty() ? TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()) : FingerprintTrustManagerFactory.builder("SHA1").fingerprints(sslCertFingerprints).build();
trustManagerFactory.init(loadKeystore(sslTrustStore, sslTrustStorePassword));
return trustManagerFactory.getTrustManagers();
} catch (GeneralSecurityException e) {
// replicate exception handling from SSLEngineProvider
throw new RemoteTransportException("Server SSL connection could not be established because SSL context could not be constructed", e);
}
}
Aggregations