![](/img/trans.png)
[英]How to convert a ip string xxx.xxx.xxx.xxx:xxxxx to xxx.xxx.xxx.xxx?
[英]HTTPS hostname wrong: should be <xxx.xxx.xxx.xxx>, checkURLSpoofing. What is the host name being passed?
我收到的错误是
com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.io.IOException: HTTPS hostname wrong: should be <xxx.xxx.xxx.xxx>
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.java:524)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:448)
我的问题是,如何获取传递给checkURLSpoofing的值? 我的意图是在我的主机文件中重新路由它。 我已经在使用此代码块来阻止主机名验证,尽管我相信它仍在发生。
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier()
{
public boolean verify(String hostname, SSLSession session)
{
return true;
}
});
我还将此添加到运行配置中以防止主机名验证
-Dweblogic.security.SSL.ignoreHostnameVerification=true
我也没有更改SSL证书的选项。
问题是主机文件条目被我背后的代理覆盖。 通过离开现场解决了该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.