2016-12-27 7 views
2

私が使用しているサイトはhttpsプロトコルのものなので、Ignore certificates.Butを使用したいですが、私は無視する証明書を設定できません。私はこのようなエラーを取得していますjodd http clientどのようにIgnore証明書を設定する

public class JoddHttpClientDemoApplication { 
    public static void main(String[] args) throws Exception { 
     SpringApplication.run(JoddHttpClientDemoApplication.class, args); 
     HttpRequest request = HttpRequest.get("https://xxxxx.com?0.6891255003788694"). 
      header("Referer","https://xxxxx.com/x.jsp"); 
     HttpResponse response = request.send(); 
     System.out.println(response); 
    } 
} 

は、

jodd.http.HttpException:sun.security.validator.ValidatorException:PKIXパスの建物は、最新のJodd V3に

+0

あなたは完全なスタックトレースを追加してもいいですか? – Thrasher

+0

私の答えは助けてくれましたか? – igr

+0

@игор\t ありがとうございます非常にありがとうございます – senz

答えて

1

スイッチを失敗しました.8.1。あなたは次の方法を持っています:trustAllCerts。それはすべての証明書を信頼します:)このように使用:

HttpRequest 
    .get("https://xxxxx.com?0.6891255003788694") 
    .header("Referer","https://xxxxx.com/x.jsp") 
    .trustAllCerts(true); 
+0

ありがとうございます。 – senz

+1

IgnoreCertificatesSocket.javaを削除できます – senz

関連する問題