【发布时间】:2009-12-04 16:39:06
【问题描述】:
M2Crypto library 在其SSL.Context object 上有一些与 CA 相关的功能,但文档并不清楚何时使用某些功能以及为什么。事实上,几乎所有的文档都是“将 CA 证书加载到上下文中”,因此它们似乎都有可能做同样的事情。
有severalexamples同时使用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()。但我还是分不清这两者的区别。
【问题讨论】: