我尝试使用根 CA 签署中间证书的 CSR,OpenSSL 要求我提供密码,然后什么也没有发生。没有错误消息,也没有生成证书。它失败的命令是:
openssl ca -config rootca.cnf -extensions v3_intermediate_ca ^
-days 730 -notext -md sha256 ^
-in C:/Certificates/IntermediateCA/csr/intermediate.csr.pem ^
-out C:/Certificates/IntermediateCA/public/intermediate.cert.pem
Run Code Online (Sandbox Code Playgroud)
openssl 响应:
Enter pass phrase for C:/Certificates/RootCA/private/rootca.key.pem:
Run Code Online (Sandbox Code Playgroud)
当我输入密码时,之后什么也没有发生。
这个问题的一个好的答案有两个部分:
额外细节
不确定是否需要这样做,但这里有一些我用来生成中间 CA 其余部分的附加命令:
创建中间CA私钥:
openssl genrsa -aes256 -out private/intermediate.key.pem 4096
Run Code Online (Sandbox Code Playgroud)
创建中级 CSR:
openssl req -config intermediateca.cnf -new -sha256 ^
-key private/intermediate.key.pem ^
-out csr/intermediate.csr.pem
Run Code Online (Sandbox Code Playgroud)
rootca.cnf(重要部分):
[ CA_default ]
dir = C:/Certificates/RootCA
...
[ policy_strict ]
countryName = match
stateOrProvinceName = match
localityName = match
organizationName …Run Code Online (Sandbox Code Playgroud)