目前,我这样写是为了在调试应用程序时完全忽略本地主机以进行SSL固定。
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.86.98</domain>
</domain-config>
问题是我不希望在我的生产应用程序中使用它。因此,我搜索并发现了调试覆盖。
https://developer.android.com/training/articles/security-config
<debug-overrides>
<trust-anchors>
<certificates src="@raw/debug_cas"/>
</trust-anchors>
</debug-overrides>
但是我不知道如何为我的特定本地主机生成证书。有没有一种方法可以完全忽略仅调试模式下的SSL固定? (例如192.168.86.98)。我该怎么办?