File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
src/main/java/com/github/dockerjava/core Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,6 @@ public SSLContext getSSLContext() {
4545
4646 Security .addProvider (new BouncyCastleProvider ());
4747
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-
5648 String caPemPath = dockerCertPath + File .separator + "ca.pem" ;
5749 String keyPemPath = dockerCertPath + File .separator + "key.pem" ;
5850 String certPemPath = dockerCertPath + File .separator + "cert.pem" ;
@@ -61,6 +53,8 @@ public SSLContext getSSLContext() {
6153 String certpem = new String (Files .readAllBytes (Paths .get (certPemPath )));
6254 String capem = new String (Files .readAllBytes (Paths .get (caPemPath )));
6355
56+ SslConfigurator sslConfig = SslConfigurator .newInstance (true );
57+ sslConfig .securityProtocol ("TLSv1.2" );
6458 sslConfig .keyStore (CertificateUtils .createKeyStore (keypem , certpem ));
6559 sslConfig .keyStorePassword ("docker" );
6660 sslConfig .trustStore (CertificateUtils .createTrustStore (capem ));
You can’t perform that action at this time.
0 commit comments