Quantcast
Channel: VMware Communities : Discussion List - VMware vCloud SDK for Java
Viewing all articles
Browse latest Browse all 144

javax.net.ssl.SSLPeerUnverifiedException with proxy

$
0
0

Dear all,

 

I get a SSLPeerUnverifiedException when tyring to login (from one of the samples):

 

javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
    at com.vmware.vcloud.sdk.RestUtil.getSupportedVersions(RestUtil.java:405)
    at com.vmware.vcloud.sdk.VcloudClient.getSupportedVersions(VcloudClient.java:224)
    at com.vmware.vcloud.sdk.VcloudClient.login(VcloudClient.java:315)
    at com.vmware.vcloud.sdk.samples.QueryAllvApps.main(QueryAllvApps.java:393)

 

I modified the code to add the proxy:

 

        VcloudClient.setLogLevel(Level.ALL);
        vcloudClient = new VcloudClient(baseUrl, Version.V1_5);
        vcloudClient.registerScheme("https", 8080, FakeSSLSocketFactory.getInstance());
        vcloudClient.setProxy("lanproxy.t-mobile.at", 8080, "https");
        vcloudClient.login(username, password);

 

which results in this error; It seems that with the proxy, the FakeSSLSocketFactory is't invoked at all. Furthermore, I have the relevant root certificate in the  fitting keystore.

 

any Ideas?

 

regards

Gernot


Viewing all articles
Browse latest Browse all 144

Trending Articles