> +         client.setConnectTimeout(utils.getConnectionTimeout(), 
> TimeUnit.MILLISECONDS);
> +         client.setReadTimeout(utils.getSocketOpenTimeout(), 
> TimeUnit.MILLISECONDS);
> +         client.setFollowRedirects(false);
> +         ConnectionSpec tlsSpec = new 
> ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
> +                 .tlsVersions(TlsVersion.TLS_1_0, TlsVersion.TLS_1_1, 
> TlsVersion.TLS_1_2)
> +                 .build();
> +         ConnectionSpec cleartextSpec = new 
> ConnectionSpec.Builder(ConnectionSpec.CLEARTEXT)
> +                 .build();
> +         client.setConnectionSpecs(ImmutableList.of(tlsSpec, cleartextSpec));
> +         
> client.setSslSocketFactory(sslContextWithKeysSupplier.get().getSocketFactory());
> +
> +         if (utils.relaxHostname()) {
> +            client.setHostnameVerifier(hostnameVerifier);
> +         }
> +         return client;
> +      }

Feedback is always welcome, so +1 to log what is going on. There should no ned 
to provide a custom unstrusted ssl context for Docker. The logging can happen 
in the SSLContextWithKeysSupplier get() method, saying that since the trust all 
certs property has been enabled its configuration will be ignored. At that 
point you should have everything you need to build the log (and the injector 
will already have been created so you can properly use an injected logger).

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/188/files#r35087115

Reply via email to