M2Crypto库在其SSL.Context 对象上有一些与 CA 相关的函数,但文档并不清楚何时使用某些函数以及为什么。事实上,几乎所有的文档都是“将 CA 证书加载到上下文中”,因此它们似乎都做同样的事情。
有几个 同时使用and的示例,但也有其他类似的功能,如and 。set_client_CA_list_from_file()
load_verify_info()
load_client_ca()
load_verify_locations()
我正在编写客户端和服务器部分。我应该使用哪些功能,为什么?他们具体做什么?
编辑:
浏览我看到的代码:
# Deprecated.
load_client_CA = load_client_ca = set_client_CA_list_from_file
和
# Deprecated.
load_verify_info = load_verify_locations
所以这有点帮助。这使我们归结为两个功能:set_client_CA_list_from_file()
和load_verify_locations()
. 但我仍然不能完全区分两者之间的区别。