Skip to content

Commit

Permalink
init sslContext
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Jun 19, 2024
1 parent a318d31 commit bb3d968
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ private MongoDatabase getDatabase(String dbName) {
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init(keyStore);
sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, trustManagerFactory.getTrustManagers(), new java.security.SecureRandom());
} catch (Exception e) {
LOGGER.warn("Error with TLS algorithm " + e.getMessage());
}
Expand Down

0 comments on commit bb3d968

Please sign in to comment.