2016-12-27 2 views
2

내가 사용하는 사이트는 https 프로토콜의 사이트이므로 무시 인증서를 사용하고 싶습니다. 그러나 무시 인증서를 설정할 수 없습니다. 나는이 같은 오류를 얻고있다jodd http client 설정 방법 인증서 무시

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

관련 문제