VCloud SDK の使用中にすべての証明書を受け入れるという問題があります。問題は、マシンに自己署名証明書があり、FakeSSL オブジェクトを使用しても機能せず、すべての証明書を受け入れることができないことです。それを機能させるための回避策を作成するにはどうすればよいですか?
VcloudClient.setLogLevel(Level.OFF);
vcloudClient = new VcloudClient(arg[0], Version.V5_5);
vcloudClient.registerScheme("<https>", 443, FakeSSLSocketFactory.getInstance());
vcloudClient.login(arg[1], arg[2]);
extension = vcloudClient.getVcloudAdminExtension();
Exception in thread "main" com.vmware.vcloud.sdk.VCloudRuntimeException: com.vmware.vcloud.sdk.VCloudRuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.vmware.vcloud.sdk.VcloudClient.getSupportedVersions(VcloudClient.java:231)
at com.vmware.vcloud.sdk.VcloudClient.login(VcloudClient.java:329)
at sdt.ericsson.capacity.main.Main.main(Main.java:155)
Caused by: com.vmware.vcloud.sdk.VCloudRuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.vmware.vcloud.sdk.RestUtil.getSupportedVersions(RestUtil.java:431)
at com.vmware.vcloud.sdk.VcloudClient.getSupportedVersions(VcloudClient.java:227)
... 2 more
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.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:641)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
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:408)
... 3 more
私の FakeSSLSocketFactory オブジェクトがあります (VMWere サンプルから)。
何かアドバイス?