要使用 OpenSSL 生成和吊销证书,你可以按照以下步骤操作:
使用 OpenSSL 生成自签名证书的步骤如下:
openssl genrsa -out key.pem 2048
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -in csr.pem -signkey key.pem -out cert.pem
要吊销证书,首先需要创建一个 CRL 文件,然后将要吊销的证书添加到 CRL 中。
openssl ca -gencrl -keyfile ca.key -cert ca.crt -out crl.pem
openssl ca -revoke cert.pem -keyfile ca.key -cert ca.crt
openssl ca -gencrl -keyfile ca.key -cert ca.crt -out crl.pem
这些步骤将帮助你生成自签名证书并吊销证书。确保你有适当的权限来执行这些操作,并且按照正确的顺序执行步骤。
就手工建一个空的demoCA/index.txt
并指定-config cnf/openssl.cnf
新建一个并写入00 保存
再试就OK了。
::生成 CRL: set CERT=KRDF2001012A202002 openssl ca -config cnf/openssl.cnf -gencrl -keyfile ca_root.key -cert ca_root.crt -out %CERT%.crl -passin pass:778899 ::吊销证书: openssl ca -revoke %CERT%.crt -keyfile ca_root.key -cert ca_root.crt -passin pass:778899 ::更新 CRL: openssl ca -gencrl -keyfile ca_root.key -cert ca_root.crt -out %CERT%.crl -passin pass:778899 pause
上一篇:HTTP 503错误是什么,HTTP 503错误的原因和解决方法
下一篇:mac远程vscode 服务器 出现 Unable to start debugging. Launch options string provided by the project system i