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

com.magictools.http.ssl.TrustAnyHostnameVerifier Maven / Gradle / Ivy

Go to download

magic-tools 是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。

The newest version!
package com.magictools.http.ssl;

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

/**
 * https 域名校验
 *
 * @author Looly
 */
public class TrustAnyHostnameVerifier implements HostnameVerifier {

	@Override
	public boolean verify(String hostname, SSLSession session) {
		return true;// 直接返回true
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy