how do I update root certificates of certifi?

蹲街弑〆低调 提交于 2021-02-19 01:15:56

问题


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.


回答1:


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

  • 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.


来源:https://stackoverflow.com/questions/47869723/how-do-i-update-root-certificates-of-certifi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!