第一步:生成证书请求文件(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]:Dotsoft 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 | 公司名称 | Dotsoft Technologies, Inc. |
Organizational Unit Name | 部门名称 | IT Dept. |
Common Name | 申请证书的域名 | www.trustasia.com |
Email Address | 不需要输入 |
|
A challenge password | 不需要输入 |
|
如需要生成中文公司名称的CSR,推荐使用我们的在线工具,地址如下:
https://www.trustasia.com/ssl-tools/csr-generate/
用户在下面填写自己的公司信息和域名,点击生成按钮后将会在证书签名请求(CSR)和私钥(KEY)两处生成对应的信息,证书签名请求(CSR)保存为domain.csr,私钥(KEY)保存为domain.key。
以上为OpenSSL工具和TrustAsia提供的在线工具生成私钥和CSR的使用方法,私钥文件(domain.key)和证书签名请求文件(domain.csr)文件生成后,用户需妥善保管。
第二步:提交,申请证书
递交证书申请表及相关资料,并把证书请求文件(CSR)提交给我们。
我们确认资料齐全后,三个工作日内完成证书颁发。
如有任何问题或疑问请直接与我们联系,谢谢!