Anxcye / Anxcye/anx-reader

[Bug]: WebDAV does not use user trust store for root certificates on Android

Đang mở
#719 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug P2
Ngôn ngữ chính
Dart
Star
8.8k
Fork
626
Merge trung bình
9 ngày 22 giờ
Pull request đã merge (30 ngày)
1

Mô tả

### Prerequisites|前提条件

- [x] I have checked the [troubleshooting](https://github.com/Anxcye/anx-reader/blob/develop/docs/troubleshooting.md)|我已经查看过[故障排除](https://github.com/Anxcye/anx-reader/blob/develop/docs/troubleshooting.md)
- [x] I have searched for similar issues and did not find any|我已经搜索过没有相同的问题

### Describe the bug|描述问题

When attempting to add a Webdav location for sync, I get a `CERTIFICATE_VERIFY_FAILED`. The server I'm connecting to is using an SSL certificate signed by a custom certificate authority that I have imported into the trust store on Android. Most applications on the device trust the certificate, it looks like anx-reader does not.

```
[WebDAV connection test failed: SSL certificate verification failed, please check HTTPS configuration DioException [unknown]: null Error: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:297))],
#0 AnxLog.severe (package:anx_raeder/utils/log/common.dart:85)
#1 SyncConnectionTester.testConnection (package:anx_reader/service/sync/sync_connection_tester.dart:32)
#2 SynctestHelper.handleTestConnection (package:anx_reader/utils/sync_test_helper.dart:32)
```

### To reproduce|重现步骤

1. Setup a WebDAV server (with Nextcloud for example) that uses an SSL certificate signed by a custom certificate authority.
2. Import the CA certificate into the system trust store on Android.
3. Use Chrome or another browser to attempt to go to the WebDAV instance and verify that the certificate is accepted.
4. Attempt to add that WebDAV URL to anx-reader.
5. Observe the SSL certificate error.

### Expected behavior|预期行为

anx-reader correctly accepts the connection by validating against the imported certificate.

### Screenshots|截图

_No response_

### Platform (please complete the following information)|平台(请填写以下信息)

- Platform: Android
- OS: Android 16, GrapheneOS
- AnxReader Version: 1.10.1+6279. 1.11 is not yet on F-Droid.
- Device: Pixel 10 Pro Fold

### Additional context|其他信息

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.