Package com.vmware.vim25.ws
Class TrustAllSSL
java.lang.Object
com.vmware.vim25.ws.TrustAllSSL
Copyright 2014-2015 Michael Rice
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HostnameVerifierReturns aHostnameVerifierthat accepts any hostname.static SSLContextstatic voidDeprecated.
-
Constructor Details
-
TrustAllSSL
public TrustAllSSL()
-
-
Method Details
-
getTrustAllHostnameVerifier
Returns aHostnameVerifierthat accepts any hostname. Used byWSClientto disable hostname verification on each per-connectionHttpsURLConnectionwhen the caller opted into ignoring certificates. This is a per-connection setting; relying onHttpsURLConnection.setDefaultHostnameVerifier(HostnameVerifier)alone has timing pitfalls (issue #115: connections via IP rejected because the captured default fired before the trust-all default was installed). -
getTrustContext
- Throws:
RemoteException
-
trustAllHttpsCertificates
@Deprecated public static void trustAllHttpsCertificates() throws NoSuchAlgorithmException, KeyManagementExceptionDeprecated.This is an unsafe method and should not be used. It will be removed at the next MAJOR release of vSphere
-