Note that there are some explanatory texts on larger screens.

plurals
  1. POKSoap2 HTTPS connection to web service
    primarykey
    data
    text
    <p>I'm using KSOAP2 to call to a web service. At first, I tried to work it without any kind of security (only HTTP) and the result was a success. Now I've added SSL security to my Web Service (it runs on an Apache Axis2), but I can't connect from my Android app by using KSOAP2. I've been searching around and the only answers I can get are the ones who tell me that I should trust all untrusted certificates (create a fake trustmanager):</p> <p><a href="https://stackoverflow.com/questions/4646121/not-trusted-certificate-using-ksoap2-android">Not trusted certificate using ksoap2-android</a></p> <p><a href="https://stackoverflow.com/questions/3440062/ksoap-2-android-with-https">KSOAP 2 Android with HTTPS</a></p> <p>And they paste always the same code:</p> <pre><code>private TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) { } } }; </code></pre> <p>Which is not what I'm looking for. This answer, even if it works, it's just only a workaround and doesn't solve the problem, just avoids it. What I want to know is if there is a way where you can modify the Android cacerts and add my untrusted certificate or just do something in order to avoid the solution I've just talked about. I don't want to create a new trustmanager if it could be possible.</p>
    singulars
    1. This table or related slice is empty.
    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