SSL CSR

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

SSL CSR

文章 yehlu »

https://www.trustasia.com/help/nginx-generate-csr.htm

第一步:生成证书请求文件(CSR)

进入OpenSSL安装的目录,运行如下命令生成私钥:
openssl req -new -nodes -newkey rsa:2048 -keyout domain.key -out domain.csr
在完成下面信息的输入后(黄色字体的部分),以上命令将会在当前目录下生成domain.key(私钥文件)和domain.csr(CSR,证书签名请求文件)两个文件,用户可以指定所生成的文件名和所在的路径,接下来提示用户继续输入申请证书的详细信息:

Loading 'screen' into random state - done
Generating a 2048 bit RSA private key
.....+++
........................................+++
writing new private key to 'domain.key'
-----
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]:Shanghai
Locality Name (eg, city) []:Shanghai
Organization Name (eg, company) [Internet Widgits Pty Ltd]:TrustAsia Technologies, Inc.
Organizational Unit Name (eg, section) []:IT Dept.
Common Name (eg, YOUR name) []:www.trustasia.com
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

从地址开始,下面的信息都不需要,请保留为空,直接回车即可。
需要输入的信息说明请见下表:
字段
说明
示例
Country Name ISO国家代码(两位字符) CN
State or Province Name 所在省份 Shanghai
Locality Name 所在城市 Shanghai
Organization Name 公司名称 TrustAsia Technologies, Inc.
Organizational Unit Name 部门名称 IT Dept.
Common Name 申请证书的域名 www.trustasia.com
Email Address 不需要输入
A challenge password 不需要输入
如需要生成中文公司名称的CSR,推荐使用我们的在线工具,地址如下:
https://www.trustasia.com/tools/csr-generate/
用户在下面填写自己的公司信息和域名,点击生成按钮后将会在证书签名请求(CSR)和私钥(KEY)两处生成对应的信息,证书签名请求(CSR)保存为domain.csr,私钥(KEY)保存为domain.key。
回覆文章

回到「nginx」