https://blog.csdn.net/qq_40582463/article/details/86933720
问题描述
通过自带的浏览器打开chls.pro/ssl下载证书文件,无法安装,提示“没有可安装的证书”。
原因
是因为小米手机默认开启了迅雷下载引擎,导致下载的证书文件内容不正确,所以无法安装。
![错误的证书文件内容](https://img-blog.csdnimg.cn/20190210215306489.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNTgyNDYz,size_16,color_FFFFFF,t_70)
![正确的证书文件内容](https://img-blog.csdnimg.cn/20190210215558198.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNTgyNDYz,size_16,color_FFFFFF,t_70)
解决办法
在【下载管理】中关闭迅雷引擎重新下载证书,安装即可。
![](https://img-blog.csdnimg.cn/20190210220728231.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNTgyNDYz,size_16,color_FFFFFF,t_70)
![](https://img-blog.csdnimg.cn/20190210220811516.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNTgyNDYz,size_16,color_FFFFFF,t_70)
![](https://img-blog.csdnimg.cn/20190210220922932.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNTgyNDYz,size_16,color_FFFFFF,t_70)
![](https://img-blog.csdnimg.cn/20190210220853844.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNTgyNDYz,size_16,color_FFFFFF,t_70)
注意事项
经过测试,在【下载管理】中直接点击打开,即使证书格式正确也无法安装,如下图。遇到这种情况可以在【文件管理器】中Download目录下找到该文件,点击安装
今天用charles抓包,忽然发现很多https抓不到了,显示为unknown,安装了证书也不管用。看到官网有这样一段话,大概的意思就是从安卓7往后,只能抓自己的app的数据包了:
As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.
In order to configure your app to trust Charles, you need to add a Network Security Configuration File to your app. This file can override the system default, enabling your app to trust user installed CA certificates (e.g. the Charles Root Certificate). You can specify that this only applies in debug builds of your application, so that production builds use the default trust profile.