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

cn.boommanpro.wechat.MyX509TrustManager Maven / Gradle / Ivy

package cn.boommanpro.wechat;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * @author BoomMan
 */
public class MyX509TrustManager implements X509TrustManager {

    // 检查客户端证书

    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
    }

    // 检查服务器端证书

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
    }

    // 返回受信任的X509证书数组

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy