openssl 是生成私钥和公钥证书的重要工具。
Windows如何安装OpenSSL:
官网:https://www.openssl.org/community/mailinglists.html 需要自己下载编译。
exe安装文件下载地址:https://slproweb.com/products/Win32OpenSSL.html
选择 Win64 OpenSSL v1.1.1d 43M的完整版本。
生成证书命令:
1.1 生成私钥命令: openssl>genrsa -aes256 -out privatekey.pem 2048
When running this command, you will be prompted to enter the pass phrase for the private key. This is your secure pass phrase and should not be shared with anyone. -This pass phrase can be anything like a password.
生成私钥的过程用会要求你填写私钥密码:建议填写8位数字作为密码,主要保存好密码。
1.2 CSR 证书文件生成: openssl>req -new -sha256 -key privatekey.pem -out certreq.csr
Once you enter the command for generating CSR, please follow the instructions on the prompt and enter the details being requested. One of the fields prompted for would be "Common Name (e.g. server FQDN or YOUR name)"..
根据提示输入国家、城市、地区、公司、部门和联系人邮箱、证书密码等信息。
1.3 关于私钥转公钥。这里就不写了。
2. 支付宝提供了生成RSA秘钥工具,网址如下。
https://docs.open.alipay.com/291/105971
原文地址:https://www.cnblogs.com/davies/p/11655601.html