JDK原生的HttpURLConnection请求实例

技术分享
package com.my.https;

import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.X509TrustManager;

public class MyX509TrustManager implements X509TrustManager{

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

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

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

}

MyX509TrustManager.java

还是要说;没测过,不知道对不对

JDK原生的HttpURLConnection请求实例

原文地址:http://www.cnblogs.com/liangblog/p/7279350.html


最新回复(0)
/jishu0RxZN5chXhxyigLH5KSZJTtffPEVOXgKKkF732C3RKA_3D4719219
8 简首页