File tree 1 file changed +2
-8
lines changed
src/main/java/com/github/dockerjava/core 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,6 @@ public SSLContext getSSLContext() {
45
45
46
46
Security .addProvider (new BouncyCastleProvider ());
47
47
48
- // properties acrobatics not needed for java > 1.6
49
- String httpProtocols = System .getProperty ("https.protocols" );
50
- System .setProperty ("https.protocols" , "TLSv1" );
51
- SslConfigurator sslConfig = SslConfigurator .newInstance (true );
52
- if (httpProtocols != null ) {
53
- System .setProperty ("https.protocols" , httpProtocols );
54
- }
55
-
56
48
String caPemPath = dockerCertPath + File .separator + "ca.pem" ;
57
49
String keyPemPath = dockerCertPath + File .separator + "key.pem" ;
58
50
String certPemPath = dockerCertPath + File .separator + "cert.pem" ;
@@ -61,6 +53,8 @@ public SSLContext getSSLContext() {
61
53
String certpem = new String (Files .readAllBytes (Paths .get (certPemPath )));
62
54
String capem = new String (Files .readAllBytes (Paths .get (caPemPath )));
63
55
56
+ SslConfigurator sslConfig = SslConfigurator .newInstance (true );
57
+ sslConfig .securityProtocol ("TLSv1.2" );
64
58
sslConfig .keyStore (CertificateUtils .createKeyStore (keypem , certpem ));
65
59
sslConfig .keyStorePassword ("docker" );
66
60
sslConfig .trustStore (CertificateUtils .createTrustStore (capem ));
You can’t perform that action at this time.
0 commit comments