PhotoBackup / client-android

The Android PhotoBackup client, made to free your pictures from your device
https://photobackup.github.io/
GNU General Public License v2.0
48 stars 15 forks source link

Support self-signed certificates #62

Open kabo opened 5 years ago

kabo commented 5 years ago

I put an nginx in front of the server with a self signed certificate. I'm getting the following message in the android client:

Server test failed, please verify your configuration. - (java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.)

I'm running a local server on an internal IP, not exposed to the internet, so can't get a LetsEncrypt cert.

kabo commented 5 years ago

If I add verify=False to line 96 of photobackup.py it says the request was successful. So I know the server is set up correctly.

kabo commented 5 years ago

DAVx5 also uses okhttp but it pops up a confirmation window allowing me to manually verify that the certificate presented it the correct one. DAVx5 seems to have created a lib for this behaviour.

https://gitlab.com/bitfireAT/cert4android