TLS安全通信 - 证书验证

发布于 2025-01-18 15:07:14 字数 233 浏览 6 评论 0原文

我需要一些信息来验证服务器证书。 我希望第一步执行基于日期的验证。 准确地说,我正在研究由 CA 签名的服务器证书是否过期的可能性。 如果 CA 有效期于 2022 年 12 月到期,我是否仍可以让其签署本应于 2023 年 4 月到期的服务器证书? 换句话说,如果我的服务器证书有一定的到期日期,我是否可以假设签署它的 CA 也具有等于或大于服务器证书的有效性? 如果不是,我应该对 CA 或 CA 链进行单独的日期验证吗?

提前致谢。

I need some information for validating a server certificate.
Am looking to perform date based validation as the first step.
To be precise, am looking at the possibility of expiry of a server certificate that is signed by a CA.
If the CA validity expires on December 2022, can I still get it to sign my server certificate that is supposed to expire only in April 2023?
In other words, if my server certificate has a certain expiry date, can I assume that the CA that signed it also has validity equal to or greater than the server certificate?
If not, should I do a separate date validation for the CA or chain of CAs?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骷髅 2025-01-25 15:07:14

如果CA有效性于2022年12月到期,我仍然可以将其签署我的服务器证书,该证书仅在2023年4月到期?

从技术上讲,是的。但是,大多数CA实施限制了已发行的证书有效性,以与CA证书寿命相交。

如果没有,我应该对CA的CA或链链?

进行单独的日期验证

作为一个很好的做法,您应该验证链中的所有证书。但是,我建议不要写自己的验证。大多数框架都提供功能齐全的证书验证引擎。日期验证不是唯一需要验证的唯一其他检查,还有许多其他检查可以按照 RFC5280§6。使用框架提供的API来验证证书并依靠其结果。

If the CA validity expires on December 2022, can I still get it to sign my server certificate that is supposed to expire only in April 2023?

technically, yes. However most CA implementations restrict issued certificates validity to intersect the CA certificate lifetime.

If not, should I do a separate date validation for the CA or chain of CAs?

as a good practice, you should validate all certificates in the chain. However, I would recommend to NOT write your own validation. Most frameworks provide fully-featured certificate validation engines. Date validation is not the only thing that requires validation, there are many other checks to perform as specified in RFC 5280 §6. Use framework-provided APIs to validate the certificate and rely on their results.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文