com.imperva.shcf4j.conn.ssl.AllowAllHostnameVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shcf4j-api Show documentation
Show all versions of shcf4j-api Show documentation
The Simple HTTP Client Facade for Java (SHCF4J) serves as a simple facade or abstraction for various HTTP client frameworks (e.g. java.net.HttpURLConnection, Apache HttpClient, etc.) allowing the end user to plug in the desired HTTP client framework at deployment time.
The newest version!
package com.imperva.shcf4j.conn.ssl;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
/**
* AllowAllHostnameVerifier
*
*
* The ALLOW_ALL HostnameVerifier essentially turns hostname verification off.
* This implementation is a no-op, and never throws the SSLException.
*
*
* @author maxim.kirilov
*/
public class AllowAllHostnameVerifier implements HostnameVerifier {
public static final HostnameVerifier INSTANCE = new AllowAllHostnameVerifier();
private AllowAllHostnameVerifier() {
}
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
}