当前位置:网站首页>如何制作CSR(Certificate Signing Request)文件?
如何制作CSR(Certificate Signing Request)文件?
2022-06-30 02:03:00 【lavin1614】
申请数字证书之前,您必须先生成证书的密钥文件和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证书[1]的具体网站域名。
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文件。
参考
边栏推荐
- What should be paid attention to in the design and production of the Urban Planning Museum
- 006_ radio
- Cookie encryption 13
- C language output integer in another format
- Pytorch中transforms的用法整理
- js Array. Five convenient applications of from()
- Circular right shift of array elements in C language
- Scala basics [introduction and installation]
- Cookie encryption 15 login encryption
- MySQL monitoring 6
猜你喜欢

Share the source code of the website of graduation student record

DTW learning (dynamic time warping) -- Thought and code implementation

C language score ranking

26.算法常用面试题

018_ rate

Gesture digital enlightenment learning machine

Cookie encryption 10

Circular right shift of array elements in C language

C language irony
![[MySQL 04] sauvegarde et restauration de la base de données MySQL sous Linux en utilisant MySQL Workbench 8.0 ce](/img/e7/fc2925a10ac5fb370dd221c3f4a46a.png)
[MySQL 04] sauvegarde et restauration de la base de données MySQL sous Linux en utilisant MySQL Workbench 8.0 ce
随机推荐
Geotools wkt coordinate system conversion
208. implement trie (prefix tree) - attach detailed notes
Cookie encryption 11
(4) Blender source code analysis flash window display process
Using face_ Recognition library reports an error reason: cudnn_ STATUS_ NOT_ SUPPORTED
Is it safe to open an account in Sinosteel futures?
Geotools: common tools for mutual conversion of wkt, geojason, feature and featurecollection
26.算法常用面试题
Using grpcui to test asp Net core grpc service
The national industrial information security development research center issued the report on industrial information security situation in 2021
If mybaits cannot query the data, it can query how to change it in the database
Varnish foundation overview 2
C语言 继续(3n+1)猜想
Yyds dry inventory consistent and smooth zoom type and spacing
工具与生活服务
Spark 离线开发框架设计与实现
Application features and functions of painting Aquarium
Restore a 35k-55k Tencent Android Senior Engineer Interview
C语言 成绩排名
DTW学习(dynamic time warping)——思想、代码实现