Skip to content

Commit

Permalink
mobile: Add support for trusting user-added CAs on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
shrizza committed Sep 23, 2022
1 parent c35b883 commit 1a2b051
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
17 changes: 17 additions & 0 deletions android/app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
<domain-config>
<domain includeSubdomains="true">zulipchat.com</domain>
<trust-anchors><certificates src="system" /></trust-anchors>
</domain-config>
<domain-config>
<domain includeSubdomains="true">zulip.org</domain>
<trust-anchors><certificates src="system" /></trust-anchors>
</domain-config>
</network-security-config>

0 comments on commit 1a2b051

Please sign in to comment.