如何更新certifi的根证书? [英] how do I update root certificates of certifi?

查看:110
本文介绍了如何更新certifi的根证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using certifi python module to verify ssl connections. I looked at the root certificates included in certifi (python2.7/site-packages/certifi/cacert.pem) and some of those certificates have expired. How do I update those certificates? I tried updating certifi package using pip but that only updates the package and not the root CA files.

推荐答案

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

certifi/cacert.pem is, naturally, a part of certifi. Consequently, it's supposed to be updated with the module.

  • 您可以在https://github.com/certifi/python-certifi 有一个更新的包,如果有,直接从那里安装模块,pip install git+https://github.com/certifi/python-certifi.
  • 您还可以将 cacert.pem 替换为满足您需求的任何其他证书包,例如 Mozilla 根证书存储.当然,您的更改将在您下次更新模块时丢失.
  • You can check if the latest code at https://github.com/certifi/python-certifi has a newer bundle and if it does, install the module directly from there with pip install git+https://github.com/certifi/python-certifi.
  • You can also replace cacert.pem with any other certificate bundle that meets your needs, like the Mozilla root certificate store. Of course, your changes will be lost the next time you update the module.

这篇关于如何更新certifi的根证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆