Skip to content

Commit a1393bf

Browse files
authored
Enable protocol configuration of SSLContext (#2337)
Fixes #2332
1 parent f14cff9 commit a1393bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker-java-core/src/main/java/com/github/dockerjava/core/LocalDirectorySSLConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public SSLContext getSSLContext() {
6464
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(tmfAlgorithm);
6565
trustManagerFactory.init(CertificateUtils.createTrustStore(capem));
6666

67-
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
67+
SSLContext sslContext = SSLContext.getInstance(AccessController.doPrivileged(getSystemProperty("ssl.protocol",
68+
"TLSv1.2")));
6869
sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
6970

7071
return sslContext;

0 commit comments

Comments
 (0)