使用HttpClient携带证书报错_Certificate for <IP> doesn‘t match any of the subject alternative names:[域名]

使用HttpClient携带pfx证书通过Https协议发送SOUP报文调用WebService接口时报如下错误:

Exception in thread "main" javax.net.ssl.SSLPeerUnverifiedException: Certificate for  doesn't match any of the subject alternative names: [域名]
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:467)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:397)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
    at org.apache.http.impl.execchain.Mai

你可能感兴趣的:(区块链技术,VIP,tls,fabric,CA)