簡體   English   中英

HTTPS主機名錯誤:應為 <xxx.xxx.xxx.xxx> ,請檢查URL欺騙。 傳遞的主機名是什么?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM