chat-health / chat.android

Android app for the CHAT project
GNU General Public License v3.0
2 stars 3 forks source link

Add CaCert root certificate to app #6

Open mackrauss opened 9 years ago

mackrauss commented 9 years ago

When connecting to the dev backend (which has a CaCert signed SSL key) with a tablet that hasn't had CaCert's root certificate added we get this error:

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

This isn't critical since the production backend has a RapidSSL certificate, but why not learn how to do this properly?

mackrauss commented 9 years ago

The new class being used is HttpsURLConnection and more information can be found here: http://developer.android.com/reference/javax/net/ssl/HttpsURLConnection.html