我不知道这是怎么回事;
$ openssl genrsa -out sign.key 4096
$ openssl req -x509 -new -nodes -key sign.key -sha256 -days 1825 -out sign.pem
...
$ openssl pkcs12 -export -out sign.pfx -inkey sign.key -in sign.pem
Enter Export Password:
Verifying - Enter Export Password:
$ openssl genrsa -out cert.key 4096
$ openssl req -new -sha256 -key cert.key -out cert.csr
$ openssl x509 -in cert.csr -out cert.pem -req -signkey sign.key -days 1001
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in cert.pem
No certificate matches private key
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in sign.pem -in cert.pem
No certificate matches private key
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in cert.pem -certfile sign.pem
No certificate matches private key
$ cat sign.pem cert.pem > bundle.pem
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in sign.pem -certfile bundle.pem
No certificate matches private key
$ cat cert.pem sign.pem > bundle.pem
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in sign.pem -certfile bundle.pem
No certificate matches private key
我尝试过在git和linux的两个窗口上这样做,结果是一样的。
发布于 2022-02-18 11:40:37
原来你不能只是签署这样的证书,并期待它的工作,我必须正确地签署使用ca;
$ openssl ca -config openssl.cnf -in cert.csr -out cert.pem
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in cert.pem
Enter Export Password:
Verifying - Enter Export Password:
我只是抓取这个openssl.cnf文件来测试:https://jamielinux.com/docs/openssl-certificate-authority/appendix/root-configuration-file.html
https://stackoverflow.com/questions/71172216
复制相似问题