panda.net.ssl.TrustedX509TrustManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.net.ssl;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509TrustManager;
public class TrustedX509TrustManager implements X509TrustManager {
public static final X509TrustManager INSTANCE = new TrustedX509TrustManager();
protected static final X509Certificate[] EMPTY_X509CERTIFICATE_ARRAY = new X509Certificate[] {};
@Override
public void checkClientTrusted(X509Certificate[] certificates, String authType) {
}
@Override
public void checkServerTrusted(X509Certificate[] certificates, String authType) throws CertificateException {
}
/**
* @return an empty array of certificates
*/
@Override
public X509Certificate[] getAcceptedIssuers() {
return EMPTY_X509CERTIFICATE_ARRAY;
}
}