快速创建ssl 的key
本文可自由转载,但请遵循“署名-非商业用途-保持一致”的创作共用协议。 永久链接:JoeCen's 小猫窝-----------------------------
这段时间经常要重建apche,每次都忘记openssl的命令要去查,干脆就把命令写在自己的blog上面。
debian的命令现在已经没有了,需要使用openssl命令去创建apache 的sll key:
1、建立key:
openssl genrsa -out server.key 1024
2、建立csr:
openssl req -new -key server.key -out server.csr
- 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]:CN
- State or Province Name (full name) [Some-State]:GD
- Locality Name (eg, city) []:GZ
- Organization Name (eg, company) [Internet Widgits Pty Ltd]:公司名
- Organizational Unit Name (eg, section) []:
- Common Name (eg, YOUR name) []: 这里填域名或者IP
- Email Address []:
- Please enter the following 'extra' attributes
- to be sent with your certificate request
- A challenge password []:
- An optional company name []:
3、建立crt
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 2000