Skip to content

Commit

Permalink
Feat: Allow user certificates so that self signed WebDAV can work
Browse files Browse the repository at this point in the history
If someone is able to install a user CA into the system, they could
also just downgrade the WebDAV setting in this app to HTTP anyway.

Bug: #1187
  • Loading branch information
zhanghai committed Apr 17, 2024
1 parent cdbd9b4 commit 31c464d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
android:fullBackupContent="true"
android:icon="@mipmap/launcher_icon"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/netework_security_config"
android:requestLegacyExternalStorage="true"
android:requestRawExternalStorageAccess="true"
android:resizeableActivity="true"
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/xml/netework_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ Copyright (c) 2024 Hai Zhang <[email protected]>
~ All Rights Reserved.
-->

<network-security-config
xmlns:tools="https://schemas.android.com/tools"
tools:ignore="AcceptsUserCertificates,InsecureBaseConfiguration">
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>

0 comments on commit 31c464d

Please sign in to comment.