【笔记】Https证书双向认证

本文记录Android App配置https证书双向认证
1、背景知识
https握手过程详解,这两篇文章说的非常清楚,感谢作者!
https://www.cnblogs.com/snowater/p/7804889.html
https://www.cnblogs.com/blogs-of-lxl/p/10136582.html

涉及的类和代码示例写的很清楚,感谢作者!
https://blog.csdn.net/u011511057/article/details/103825285

2、类
KeyStore 秘钥库,用于存储加密密钥和证书。

TrustManagerFactory
This class acts as a factory for trust managers based on a source of trust material. Each trust manager manages a specific type of trust material for use by secure sockets. The trust material is based on a KeyStore and/or provider specific sources.

SSLContext 安全套接字协议实现类 ,Android支持的协议如下


image.png

OkHttpClient.Builder.sslSocketFactory
Sets the socket factory and trust manager used to secure HTTPS connections. If unset, the system defaults will be used.

类关系

image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容