Hi Andrea,
Please let me know any location or sample URL that I can see a sample.
However I already tried with following sample code..
System.setProperty("https.protocols", "TLSv1.2");
System.setProperty("jdk.tls.client.protocols", "TLSv1,TLSv1.1,TLSv1.2");
Module tlsModule = new AbstractModule() {
@Override
protected void configure() {
bind(OkHttpClientSupplier.class).to(TLSOkHttpClientSupplier.class);
}
};
Iterable<Module> modules1 = ImmutableSet.of(tlsModule, new
OkHttpCommandExecutorServiceModule());
BlobStoreContext context = ContextBuilder.newBuilder("swift")
.modules(modules1)
.endpoint("https://tok02.objectstorage.softlayer.net/auth/")
.credentials("userId", "pwd")
.buildView(BlobStoreContext.class);
This gives me following error:
Exception in thread "main" org.jclouds.http.HttpResponseException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target connecting to GET
https://tok02.objectstorage.softlayer.net/auth/v1.0 HTTP/1.1
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at
com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
at com.sun.proxy.$Proxy47.invoke(Unknown Source)
….
….
Exception in thread "main" org.jclouds.http.HttpResponseException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target connecting to GET
https://tok02.objectstorage.softlayer.net/auth/v1.0 HTTP/1.1
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at
com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
at com.sun.proxy.$Proxy47.invoke(Unknown Source)
…
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:144)
at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:130)
at
java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
From: Andrea Turli [mailto:[email protected]]
Sent: Friday, April 13, 2018 6:27 PM
To: [email protected]
Subject: Re: Upgrading to TLSv1.2 in Jcloud...
Hi,
Pretty sure that jclouds can support your scenario by injecting
OkHttpClientDriver in the context.
See Docker provider for an example
HTH,
Andrea
Il ven 13 apr 2018, 14:41 Pratheesh <[email protected]> ha scritto:
We are using JClouds 1.9.1 to upload files to Softlayer. Recently softlayer
upgraded to TLSv1.2. So our existing code is failing.
What we have to change in Jclouds to support TLSv1.2, so that it can upload
files to Softlayer.
Regards
Pratheesh