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

panda.net.ssl.TrustedX509TrustManager Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy