我在客户端的服务器上遇到了这样的问题,因为我不知道如何在其他证书中验证SSLCertificateChainFile。我有一个包含很多SSL证书密钥和相应文件(.crt,.key)的文件夹。另外,我知道my.example.com网站的SSLCertificateFile和SSLCertificateKeyFile。我检查了它们之间的MD5哈希值:
openssl x509 -noout -modulus -in my-exam.crt| openssl md5
(stdin)= d41d8cd98f00b204e9800998ecf8427e
openssl rsa -noout -modulus -in my-exam.key | openssl md5
(stdin)= d41d8cd98f00b204e9800998ecf8427e
其他证书文件具有其他名称,它们不同于my-exam
。
我的问题是:如果我们已经知道SSLCertificateFile和SSLCertificateKeyFile,如何使用OpenSSL在其他证书文件中找出SSLCertificateChainFile?
经过长时间的研究,我找到了验证与我的SSLCertificateFile和SSLCertificateKeyFile相关的SSLCertificateChainFile的方法。当OpenSSL验证证书时,它首先创建整个证书链。以下命令
sudo openssl verify -verbose -CAfile sf_bundle.crt my-exam.crt
帮助我验证SSLCertificateChainFile(sf_bundle.crt
)。输出必须是:
my-exam.crt: ok
与其他.crt文件,我只有错误。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句