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

com.mps.deepviolet.api.TrustAllX509TrustManager Maven / Gradle / Ivy

The newest version!
package com.mps.deepviolet.api;

import java.security.cert.X509Certificate;

import javax.net.ssl.X509TrustManager;

/**
 * A SSL\TLS trust manager that trusts all X509 certs.  Necessary so we can
 * receive and examine metadata for bad certificates. 
 * For more information see, 
 * Java: Overriding function to disable SSL certificate check
 * @author Milton Smith
 */
class TrustAllX509TrustManager implements X509TrustManager {

	public X509Certificate[] getAcceptedIssuers() {
	        return new X509Certificate[0];
    }

    public void checkClientTrusted(java.security.cert.X509Certificate[] certs,
            String authType) {
    }

    public void checkServerTrusted(java.security.cert.X509Certificate[] certs,
            String authType) {
    }

}
	




© 2015 - 2024 Weber Informatics LLC | Privacy Policy