There is a code that sends a post request to the server
Document doc = Jsoup.connect("https://mysite.com") .data("first", "true") .post(); Log.d("tag", doc.body().text()); This error occurs:
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:381) at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:209) at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:478) at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433) at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290) at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240) at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81) at libcore.net.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:165) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:746) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:722) at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:306) at org.jsoup.helper.HttpConnection.post(HttpConnection.java:301) at ru.kiceargy.rcr$1.run(remote_controller.java:31) at java.lang.Thread.run(Thread.java:856) Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:276) at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:197) at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:584) at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method) 06-20 18:48:17.387 27351-27366/ru.kiceargy.rc W/System.err: at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:378) ... 13 more Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. ... 18 more Google for a long time, did not find a solution.