> + 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;
> + }
Why do you need to do this? I mean, this seems to be a copy of the OkHttp
config module but overriding some defaults.
The idea behind the OkHttp client supplier is to allow users to provide their
custom and initialised client (configuring there all needed SSL stuff,
protocols, etc). Copy/pasting the OkHttp module here does not seem like the
best approach.
Why isn't the OkHttp client suppler enough for Docker?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/188/files#r35048827