本文记录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支持的协议如下

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

网友评论