Does Android's WebView support HSTS?

时光怂恿深爱的人放手 提交于 2019-12-09 13:48:21

问题


Does Android WebView support HSTS?


回答1:


Yes, second this website: http://caniuse.com/#search=hsts since android 4.4

Main changes:

Certificate pinning

Trusted CA's

Add CA's to debug

Limit CA's

Add CA's hierarchy...

But the most important thing will be enabled on the new android N in an res/xml/network_security_config.xml like this: https://koz.io/network-security-policy-configuration-for-android-apps/

<domain-config hstsEnforced=[True|False] cleartextTrafficPermitted=[True|False]>  
   <domain includeSubdomains=[True|False]>koz.io</domain>
   <pin-set expiration="exp-date">
     <pin digest=sha256>PaJOmDNhWkVBvuXfzqXMyfo7kgtGpcyZp6L8EqvM8Ck=</pin>
</pin-set>

This is the official documentation from google: https://developer.android.com/training/articles/security-config.html



来源:https://stackoverflow.com/questions/37379933/does-androids-webview-support-hsts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!