bitwarden / mobile

Retired Bitwarden mobile app for iOS and Android (MAUI/Xamarin).
https://bitwarden.com
GNU General Public License v3.0
65 stars 9 forks source link

Self-Signed SSL doesn't work - There is a problem connecting to the server. #465

Open Qh0UZ0dmTQd8c6SPHDa3DymEBJtgaQA8rb7NUlc opened 5 years ago

Qh0UZ0dmTQd8c6SPHDa3DymEBJtgaQA8rb7NUlc commented 5 years ago

I have validated the certificate, did everything that was suggested in the issues, etc. I'm using a self-signed certificate made by OpenSSL using the command openssl req -x509 -newkey rsa:4096 -keyout key.pem -out certs.pem -nodes -days 9999 -subj '/CN=domainname.com' -reqexts SAN -extensions SAN -config <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:www.domainname.com')) -sha256

On PC i can install the CA certificate and the desktop app works, but on Samsung phones you cannot install CA certificates without root. There should be an option to disable SSL checking or to use the certificate without having it inside the trust store.

FcBsPkbCeulC3VIkQANLvcSxvvRsBY4b75Icen5 commented 5 years ago

@xMateMCPE I totally agree. In addition, there should be a way to use client certificates as well.

jcx7sgTEzZuoN6b6s1WWw34J4Ycgm9tW5MYRlaG commented 5 years ago

Solved: importing the self signed root CA for W-iFi instead of for "VPN and apps" makes it work. There's nothing wrong with the bitwarden app. The Android system CA port dialog is not clear

Tested this on an S9

Qh0UZ0dmTQd8c6SPHDa3DymEBJtgaQA8rb7NUlc commented 5 years ago

It didn't work for me on Oreo, since it no longer trusts user certificates for apps. Maybe on newer Android versions it works, but I don't have phones with newer versions. For me installing the certificate with root fixed it.

eykgVnPHNlEmB7Mqo3vqY1Q3rF5dW2UVabYaJEl commented 5 years ago

I am also having an issue with the app on Pixel 2 and iphone se. I can login via web browser on computer after import certs on computer, and Firefox reports trusted ssl, but not Chrome. I imported the full chain (server, intermediate, and ca) self signed certs as one .crt file, as well as the intermediate and ca separately, both vpn/apps and wifi, and it doesn't work.

eykgVnPHNlEmB7Mqo3vqY1Q3rF5dW2UVabYaJEl commented 5 years ago

I am also having an issue with the app on Pixel 2 and iphone se. I can login via web browser on computer after import certs on computer, and Firefox reports trusted ssl, but not Chrome. I imported the full chain (server, intermediate, and ca) self signed certs as one .crt file, as well as the intermediate and ca separately, both vpn/apps and wifi, and it doesn't work.

OK, please disgregard this post. I resolved the issue. It was related to certificates for sure. I recreated my setup, and made sure my self signed certs were working properly on the computer. Both Chrome and Firefox show green after recreating and fixing problems found from developer console in Chrome. Then I imported certs in android (non-root), and the app works! Thank you again for a great app!