【问题标题】:how do I update root certificates of certifi?如何更新证书的根证书?
【发布时间】:2018-05-31 20:53:15
【问题描述】:

我正在使用 certifi python 模块来验证 ssl 连接。我查看了 certifi (python2.7/site-packages/certifi/cacert.pem) 中包含的根证书,其中一些证书已过期。如何更新这些证书?我尝试使用 pip 更新 certifi 包,但这只会更新包而不是根 CA 文件。

【问题讨论】:

    标签: python ssl urllib root-certificate certifi


    【解决方案1】:

    certifi/cacert.pem 自然是certifi 的一部分。因此,它应该与模块一起更新。

    • 您可以检查https://github.com/certifi/python-certifi 的最新代码是否有更新的包,如果有,请使用pip install git+https://github.com/certifi/python-certifi 直接从那里安装模块。
    • 您还可以将cacert.pem 替换为满足您需要的任何其他证书包,例如Mozilla root certificate store。当然,您的更改将在您下次更新模块时丢失。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-21
      • 2017-06-14
      • 1970-01-01
      • 2020-10-17
      • 2020-07-11
      • 2016-01-01
      • 1970-01-01
      相关资源
      最近更新 更多