当前位置:网站首页>如何制作CSR(Certificate Signing Request)文件?
如何制作CSR(Certificate Signing Request)文件?
2022-06-28 17:19:00 【华为云】
申请数字证书之前,您必须先生成证书的密钥文件和CSR文件。CSR文件是您的公钥证书原始文件,包含了您的服务器信息和您的单位信息,需要提交给CA认证中心进行审核。建议您使用系统创建的CSR文件,避免出现输入信息错误而导致审核失败。若您选择手动生成CSR文件,请务必妥善保管并备份您的密钥文件。手动生成CSR文件时需要注意以下信息:
输入的中文信息需要使用UTF-8编码格式,同时需要在编辑OpenSSL工具时,指定支持UTF-8编码格式。
证书服务系统对CSR文件的密钥长度有严格要求,密钥长度必须是2048bit,密钥类型必须为RSA。如果申请证书是多域名或者通配子域名,在Common Name或 What is your first and last name?区域只需要输入一个域名。
以下是使用不同工具生成CSR文件的详细内容。
说明:如果您需要输入中文信息,建议使用Keytool工具生成CSR文件。
使用OpenSSL工具生成CSR文件
登录服务器。
安装OpenSSL工具。
执行以下命令,生成CSR文件。
opensslreq-new-nodes-sha256-newkeyrsa:2048-keyout[$Key_File]-out[$OpenSSL_CSR]
说明:
-new:指定生成一个新的CSR文件。
-nodes:指定密钥文件不被加密。
-sha256:指定摘要算法。
-newkey rsa:2048:指定密钥类型和长度。
[$Key_File]:密钥文件名称。
[$OpenSSL_CSR]:加密后文件的存放路径。
系统显示类似如下。

根据系统返回的提示,输入生成CSR文件所需的信息。以下是关于提示的说明:
Organization Name:公司名称,可以是中文或英文。
Organization Unit Name:部门名称,可以是中文或英文。
Country Code:申请单位所属国家,只能是两个字母的国家码。例如,中国只能是CN。
State or Province:州名或省份名称,可以是中文或英文。
Locality:城市名称,可以是中文或英文。
Common Name:申请SSL证书的具体网站域名。
Email Address:可选择不输入。
A challenge password:可选择不输入。
5、完成命令提示的输入后,当前目录下获取密钥文件和CSR文件。
使用Keytool工具生成CSR文件
1、登录服务器。
2、安装Keytool工具。
说明:Keytool工具一般包含在JDK工具包中。
3、执行以下命令,生成keystore证书文件。
keytool -genkey -alias [$Alias] -keyalg RSA -keysize 2048 -keystore [$Keytool_Path]
说明:
-keyalg:密钥类型。
-keysize:密钥长度为2048bit。
[$Alias]:证书别名,可自定义。
[$Keytool_Path]:证书文件保存路径。
4、根据系统返回的提示,输入证书保护密码。
5、根据系统返回的提示,输入生成CSR文件所需的信息。以下是关于提示的说明:
first and last name:申请证书的域名。
name of your organizational unit:部门名称。
name of your organization:公司名称。
name of your City or Locality:城市名称。
name of your State or Province:州名或省份名称。
two-letter country code for this unit:两位字符的ISO国家代码。
6、确认输入内容是否正确,输入Y表示正确。
7、根据提示输入密钥密码。
8、执行以下命令,生成CSR文件。
keytool -certreq -sigalg SHA256withRSA -alias [$Alias] -keystore [$Keytool_Path] -file [$Keytool_CSR]
说明:
sigalg:摘要算法。
[$Keytool_CSR]:CSR文件存放路径。
9、根据提示输入证书密码,生成CSR文件。
边栏推荐
- It's said that software testing for career change can only be self-taught. Is the training institution a pit?
- Can tongdaxin open an account for stock trading? Is it safe?
- Which securities company is better and safer to choose for opening an exchange fund account by mobile phone
- Leetcode 6. Zigzag transformation (awesome, solved)
- Google推出Advanced API Security 保护API免受安全威胁
- 2022 review questions and answers for safety production management personnel of hazardous chemical production units
- [dark horse morning post] Tencent responded that a large number of users' QQ numbers were stolen; Weiya's husband company was fined 190000 yuan; China Evergrande is applied for liquidation; Guanxiaoto
- WPF video hard decoding, rendering and playing (no airspace) (support 4K, 8K and high frame rate video)
- Learning process summary of ARM9 development [easy to understand]
- RHEL6.4中使用Cacti+Spine监控远程主机
猜你喜欢

MySQL高可用之MHA(一不小心和我的青春擦肩而过)

TDengine ×英特尔 边缘洞见软件包 加速传统行业的数字化转型

单片机修改网络硬件驱动(phy芯片更换)

NoSQL redis configuration and optimization (I blew the night breeze of Qinhuai River for you when you were not in Nanjing)

58 Technology Salon issue 31 flutter dynamic special Salon

MySQL中的日志管理 日志備份與恢複

MySQL高可用之MHA(一不小心和我的青春擦肩而過)

Google launches advanced API security to protect APIs from security threats

麻醉不止“打一针”那么简单,无痛、安全、舒适为患者首选

Visio use
随机推荐
2022 review questions and answers for safety production management personnel of hazardous chemical production units
[question skimming diary] and a subarray of K
[tcapulusdb] I wish you all a healthy Dragon Boat Festival!
NP tips: random create random matrix sample = np random. random([19, 64 , 64, 3])
Which securities company is better and safer to choose for opening an exchange fund account by mobile phone
RHEL6.4中使用Cacti+Spine监控远程主机
6 - Dictionary
2022起重机械指挥考试题库模拟考试平台操作
Redis persistence (les adolescents naviguent toujours rapidement, obstruent et ne tournent jamais)
Introduction to PMD source code analyzer
2022年山东省安全员C证考试练习题及模拟考试
7-user input and while loop
MySQL high availability MHA (accidentally passed my youth)
Google推出Advanced API Security 保护API免受安全威胁
How to do a good job of gateway high availability protection in the big promotion scenario
Pure big resentment! Those who were discouraged from taking the postgraduate entrance examination
[tcapulusdb knowledge base] how webclient users read and modify data
此虚拟机的处理器所支持的功能不同于保存虚拟机状态的虚拟机的处理器所支持的功能
It's said that software testing for career change can only be self-taught. Is the training institution a pit?
MySQL高可用之MHA(一不小心和我的青春擦肩而過)