title: Trust anchor for certification path not found exception
body: <p>Hi I'm trying to establish ssl communication between tomcat server and android app using https</p>
  
  <p>1- I used keytool to create a keystore file for tomcat</p>
  
  <p>2- then generate a pem file to use it with keytool to generate a BKS file</p>
  
  <p>3- the tomcat server is working fine</p>
  
  <p>basically I followed this article</p>
  
  <p>The problem is when I try to Connect from android app using HttpsURLConnection I always get the exception :</p>
  
  <hr>
  
  <pre><code>javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
  at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:351)
  at com.android.okhttp.Connection.upgradeToTls(Connection.java:1323)
  at com.android.okhttp.Connection.connect(Connection.java:1225)
  at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:395)
  at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298)
  at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399)
  at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:110)
  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:221)
  at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
  at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
  at org.apache.cordova.rest.Rest.send(Rest.java:177)
  </code></pre>
  
  <hr>
  
  <p>help !!</p>