通过centos7上自带的openssl工具来生成。首先创建一个pfxcert目录。然后进入此目录。
1.生成.key文件(内含被加密后的私钥),要求输入一个自定义的密码
[root@localhost cert]# openssl genrsa -des3 -out server.key 2048
Generating RSA private key, 2048 bit long modulus
..........+++
..........+++
e is 65537 (0x10001)
Enter pass phrase for server.key: *****(此处需要键入自定义的密码)
Verifying - Enter pass phrase for server.key:*****(此处需要键入上面的密码,其确认作用)
-des3:对私钥进行加密的算法,key文件中的私钥是被对称加密过的。再解密时,获取对称加密密钥和口令,盐值,迭代次数 有关,根据这些推算出来,但这里的口令不是指的加密密钥。
2.生成.crt文件(公钥证书,这里没有先显示的生成csr文件,然后再根据csr文件生成crt文件)
[root@localhost cert]# openssl req -new -x509 -key server.key -out server.crt -days 18250
Enter pass phrase for server.key: *****(此处需要键入key文件的密码)
You are about to be asked to enter information that will be incorporated
into your
357




被折叠的 条评论
为什么被折叠?



