Adds a new network_security_config to allow custom CAs installed by user. This is needed for Android 7+, see https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html.

Этот коммит содержится в:
Martin Wilhelm
2017-09-07 10:43:05 +02:00
родитель 40eaa5e26c
Коммит f64f585c90
2 изменённых файлов: 11 добавлений и 1 удалений
+2 -1
Просмотреть файл
@@ -9,7 +9,8 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme"
android:networkSecurityConfig=”@xml/network_security_config”>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
+9
Просмотреть файл
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>