org.defendev.common.net.ssl.LaxHostnameVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-jdk Show documentation
Show all versions of common-jdk Show documentation
Common utils purely based on JDK and no other dependencies. Only exception being for org.jetbrains:annotations for building stratgic Kotlin language compatibility.Another only-exception is Apache Commons Lang3.
The newest version!
package org.defendev.common.net.ssl;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
/**
* Permissive, "accept-all" implementation of javax.net.ssl.HostnameVerifier
*
*/
public class LaxHostnameVerifier implements HostnameVerifier {
LaxHostnameVerifier() {}
@Override
public boolean verify(String hostname, SSLSession session) {
return true;
}
}