在异类环境中保护文件传输
2009-07-12 08:34:57 来源:WEB开发网把上面的密钥内容复制到文件 server_key.pem 中。
接下来,为刚才创建的密钥创建一个证书请求(包含它的公共密钥):
清单 5. 创建的密钥的证书请求
openssl req -new -key server_key.pem -out server_req.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:TX
Locality Name (eg, city) []:Austin
Organization Name (eg, company) [Internet Widgits Pty Ltd]:IBM
Organizational Unit Name (eg, section) []:AIX
Common Name (eg, YOUR name) []:server
Email Address []:server@austin.ibm.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:1234
An optional company name []:ibm
接下来,用根 CA 的私有密钥和自签名的公共密钥对服务器密钥请求进行签名。这会创建服务器证书(同样,有效期大约为 10 年):
更多精彩
赞助商链接