cn.geektool.http.ssl.TrustAnyHostnameVerifier Maven / Gradle / Ivy
The newest version!
package cn.geektool.http.ssl;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
/**
* https 域名校验
*
* @author jd
*/
public class TrustAnyHostnameVerifier implements HostnameVerifier {
@Override
public boolean verify(String hostname, SSLSession session) {
return true;// 直接返回true
}
}