Note that there are some explanatory texts on larger screens.

plurals
  1. POTrust all certificates? X509Certificate
    primarykey
    data
    text
    <p>I have following code which connects through HTTPS but i am getting following error during connection attempt.</p> <blockquote> <p>WARN/System.err(9456): javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate signature.</p> </blockquote> <p>How do i get this solved? Trust all certificates? how do i do that? It would be no issue as i only connect to the same server. FY i already implemented EasyX509TrustManager as a class in my app.</p> <p>Thank you in advance.</p> <pre><code> try { HttpClient client = new DefaultHttpClient(); // Setting up parameters SchemeRegistry schemeRegistry = new SchemeRegistry(); // http scheme schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); // https scheme schemeRegistry.register(new Scheme("https", new EasySSLSocketFactory(), 443)); HttpParams params = new BasicHttpParams(); params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30); params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(30)); params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); ClientConnectionManager cm = new ThreadSafeClientConnManager(params, schemeRegistry); DefaultHttpClient httpClient = new DefaultHttpClient(cm, client.getParams()); // Example send HttpsPost request final String url = "https://www.xxxx.com/web/restricted/form/formelement"; // Do the HTTPS Post HttpPost httpPost = new HttpPost(url); ArrayList&lt;NameValuePair&gt; postParameters; postParameters = new ArrayList&lt;NameValuePair&gt;(2); postParameters.add(new BasicNameValuePair("usr_name", username)); postParameters.add(new BasicNameValuePair("usr_password", password)); System.out.println(postParameters); HttpResponse response = httpClient.execute(httpPost); Log.w("Response ","Status line : "+ response.toString()); </code></pre> <hr> <p>Hi Peter,</p> <p>Thx for your answer, i followed your advise and the could not validate message is gone. However now i am getting the following message:</p> <p>09-26 23:47:20.381: WARN/ResponseProcessCookies(10704): Cookie rejected: "BasicClientCookie[version=0,name=ObFormLoginCookie,domain=www.kpn.com,path=/web/restricted/form?formelement=512663,expiry=null]". Illegal path attribute "/web/restricted/form?formelement=512663". Path of origin: "/web/restricted/form/formelement=512663" 09-26 23:47:20.461: WARN/Response(10704): Status line : org.apache.http.message.BasicHttpResponse@407afb98</p> <p>So something seems to be wrong in the headers?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload