certifi 2024.2.2版本和certifi 2016.2.28的cacert.pem如何具有相同的有效性

问题描述 投票:0回答:1

只是想知道为什么不同版本的 python 模块 certifi 的 cacert.pem 具有相同的有效期。我已经检查了certifi版本2018.4.16和2024.2.2

证书2018.4.16

[root@8a63ff0c0dba /]# python3.3 -m pip show certifi
Name: certifi
Version: 2018.4.16
Summary: Python package for providing Mozillas CA Bundle.
Home-page: http://certifi.io/
Author: Kenneth Reitz
Author-email: [email protected]
License: MPL-2.0
Location: /usr/local/lib/python3.3/site-packages
Requires: 
Required-by: requests

[root@8a63ff0c0dba /]# openssl x509 -enddate -noout -in /usr/local/lib/python3.3/site-packages/certifi/cacert.pem
notAfter=Jan 28 12:00:00 2028 GMT

证书2024.2.2

[root@1e6dfr05dhd /]# python3.11 -m pip show certifi
Name: certifi
Version: 2024.2.2
Summary: Python package for providing Mozillas CA Bundle.
Home-page: https://github.com/certifi/python-certifi
Author: Kenneth Reitz
Author-email: [email protected]
License: MPL-2.0
Location: /usr/local/lib/python3.11/site-packages
Requires: 
Required-by: requests

[root@1e6dfr05dhd /]# openssl x509 -enddate -noout -in /usr/local/lib/python3.11/site-packages/certifi/cacert.pem
notAfter=Jan 28 12:00:00 2028 GMT

2028年1月28日后cacert.pem的有效性会自动更新吗?

python ssl ssl-certificate cacerts certifi
1个回答
0
投票

cacert.pem 没有有效期。

此文件是 100 多个 CA 证书的集合,每个证书都有自己的到期日期。用于检查“cacert.pem 的有效期”的命令仅输出此文件中第一个证书的到期时间,该证书可能是“GlobalSign 根 CA”。

只要将此确切的证书放在 cacert.pem 中的第一位,无论其他证书是否已更改,此输出都将保持不变。如果只是重新排序证书,即使没有更新、添加或删除证书,输出也会发生变化。

所以使用这个命令来检查cacert.pem是没有意义的。

© www.soinside.com 2019 - 2024. All rights reserved.