Https证书双向认证

2020-11-11  本文已影响0人  小瓜子壳

本文记录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
上一篇 下一篇

猜你喜欢

热点阅读