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

org.dstadler.commons.net.AllowingHostnameVerifier Maven / Gradle / Ivy

There is a newer version: 1.3.4
Show newest version
package org.dstadler.commons.net;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;

/**
 * Allows to connect to HTTPS urls without verifying the host mentioned in the SSL certificate.
 *
 * @author dominik.stadler
 */
public final class AllowingHostnameVerifier implements HostnameVerifier {
	private static HostnameVerifier INSTANCE = new AllowingHostnameVerifier();

	public static HostnameVerifier instance() {
		return INSTANCE;
	}

	@Override
	public boolean verify(String hostname, SSLSession session) {
		return true;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy