我使用以下命令在 Ubuntu 中生成 TLS 证书:
openssl req -new -newkey rsa:4096 -x509 -nodes -days 365 -keyout server.key -out server.crt -subj "/C=SG/ST=Singapore/L=Singapore /O=My Company Pte. Ltd./OU=My Organization/CN=localhost/[email protected]"
openssl pkcs12 -export -out twocerts.pfx -inkey server.key -in server.crt -certfile server.crt -passout pass:mypass
-in
和-certfile
有什么区别?他们彼此多余吗?当我只使用-certfile
而不使用-in
时它会挂起:
openssl pkcs12 -export -out /tmp/localhost.pfx -inkey server.key -certfile server.crt -passout pass:mypass
在同一命令中同时使用两者的用例是什么?
如何在 Windows 11 中运行这些命令?