All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.macrocloud.kernel.toolkit.ssl.DisableValidationTrustManager Maven / Gradle / Ivy

There is a newer version: 1.1.0-RELEASE
Show newest version
package org.macrocloud.kernel.toolkit.ssl;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * 不进行证书校验.
 *
 * @author macro
 */
public class DisableValidationTrustManager implements X509TrustManager {

	/** The Constant INSTANCE. */
	public static final X509TrustManager INSTANCE = new DisableValidationTrustManager();

	/**
	 * 

* Title: checkClientTrusted *

*

* Description: *

* * @param x509Certificates * @param s * @throws CertificateException * @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.X509Certificate[], * java.lang.String) */ @Override public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { } /** *

* Title: checkServerTrusted *

*

* Description: *

* * @param x509Certificates * @param s * @throws CertificateException * @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.X509Certificate[], * java.lang.String) */ @Override public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { } /** *

* Title: getAcceptedIssuers *

*

* Description: *

* * @return * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers() */ @Override public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy