X Tutup
The Wayback Machine - https://web.archive.org/web/20220508101327/https://github.com/authpass/authpass/issues/177
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android, Webdav, self signed certificate, handshake error #177

Open
requiem958 opened this issue Oct 4, 2020 · 3 comments
Open

Android, Webdav, self signed certificate, handshake error #177

requiem958 opened this issue Oct 4, 2020 · 3 comments
Labels

Comments

@requiem958
Copy link

@requiem958 requiem958 commented Oct 4, 2020

Problem

When using Authpass on Android, we cannot connect to a https webdav server which used a self-signed certificate, even if the certificate is present on the device.

System & App information

  • Authpass v 1.7.8+147 from F-Droid
  • Android 9 on LG G6

How to reproduce

  1. Setup a webdav server with self signed certificate.
  2. Add the certificate in your Android device ("Security and Location" -> "Encryption & credentials" -> "Install from storage")
  3. Try to fetch a kdbx file from webdav content in authpass

Should produce an error box containing :

Error while trying to authenticate to WebDAV.
HandshakeException:
Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:354))

Log from authpass

2020-10-04 22:00:57.965911 FINER analytics - (noop) screen(/cloudStorage/selector/WebDavProvider)
2020-10-04 22:00:59.490624 FINEST main - didPush
2020-10-04 22:00:59.491784 FINER analytics - (noop) screen(_DialogRoute<UrlUsernamePasswordResult>)
2020-10-04 22:01:00.355917 FINER format_utils - Initialized with locale fr
2020-10-04 22:01:14.203244 FINER format_utils - Initialized with locale fr
2020-10-04 22:01:15.640015 FINER format_utils - Initialized with locale fr
2020-10-04 22:01:16.582309 FINER format_utils - Initialized with locale fr
2020-10-04 22:01:19.294733 FINER analytics - (noop) screen(/cloudStorage/selector/WebDavProvider)
2020-10-04 22:01:19.390127 FINER format_utils - Initialized with locale fr
2020-10-04 22:01:19.908838 SEVERE authpass.google_drive_ui - Error while authenticating.
### HandshakeException: HandshakeException: Handshake error in client (OS Error: 
	CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:354))

2020-10-04 22:01:19.911635 FINEST main - didPush
2020-10-04 22:01:19.912612 FINER analytics - (noop) screen(/dialog/alert/error)
@hpoul hpoul added good first issue hacktoberfest help wanted platform-android labels Oct 4, 2020
@hpoul
Copy link

@hpoul hpoul commented Oct 4, 2020

I just looked how this could be implemented. I have no idea why installed certificates aren't picked up (maybe we should investigate and file an issue with dart (or flutter?))
The http package we use also does not expose a method to allow a custom certificate :-/ dart-lang/http#458 - but as described in this issue we could override it with a custom dart:io HttpClient and use either setTrustedCertificates or set a callback badCertificateCallback and ask the user whether to accept the certificate.

@ikogan
Copy link

@ikogan ikogan commented Mar 12, 2021

Hey just chiming in to say that this is an absolute necessity for me as well. My CA certificate is installed in my Android trust store but it's not being picked up.

@mlefkon
Copy link

@mlefkon mlefkon commented Apr 23, 2021

Same issue in iOS. Self-signed/insecure certificate not accepted over WebDAV.
pic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
X Tutup