gpt4 book ai didi

openssl - 使用 openssl verify 验证证书链

转载 作者:行者123 更新时间:2023-12-03 04:39:27 30 4
gpt4 key购买 nike

我正在使用以下组件构建自己的证书链:

Root Certificate - Intermediate Certificate - User Certificate

根证书是自签名证书,中间证书由根证书和中间证书由用户签名。

现在我想验证用户证书是否通过根证书进行锚定。

openssl verify -verbose -CAfile RootCert.pem Intermediate.pem

验证没问题。在下一步中,我将使用

验证用户证书
openssl verify -verbose -CAfile Intermediate.pem UserCert.pem

验证显示

error 20 at 0 depth lookup:unable to get local issuer certificate

出了什么问题?

最佳答案

来自验证文档:

If a certificate is found which is its own issuer it is assumed to be the root CA.

换句话说,根 CA 需要自签名才能进行验证。这就是你的第二个命令不起作用的原因。试试这个:

openssl verify -CAfile RootCert.pem -untrusted Intermediate.pem UserCert.pem

它将通过一个命令验证您的整个链。

关于openssl - 使用 openssl verify 验证证书链,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25482199/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com