开发者

Problem with SSL on tomcat with this code

i would like to know what this error means: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target null

this error appers when i try to use this state:

private Htt开发者_JAVA百科pState setcookies(String msg){
    HttpState state = new HttpState();
    String[] splited;
    String authToken=null;
    String tokenSecret=null;
    splited = msg.split(" ");
    authToken=splited[1];
    tokenSecret=splited[2];
    org.apache.commons.httpclient.Cookie cookie = new org.apache.commons.httpclient.Cookie("winter.servebeer.com", EXTCOOKIE+"accessToken", authToken);
    cookie.setPath("/OfeliaP");
    state.addCookie(cookie);
    cookie=new org.apache.commons.httpclient.Cookie("winter.servebeer.com", EXTCOOKIE+"tokenSecret", tokenSecret);
    cookie.setPath("/OfeliaP");
    state.addCookie(cookie);
    return state;
}


I've experienced this kind of thing. I suspect that the problem is that you've configured the server to present the certificate chain in the wrong order. Web browsers typically don't care, but the Java implementation of SSL / TLS requires the certificates in the chain to be in the right order.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜