ssl证书生成工具是什么?想必都知道无论申请的是免费ssl证书还是ca颁发的ssl证书,都是要安装并生成证书方能正常使用。生成ssl证书的步骤也有所不同,有简单也有复杂的,那接下来,小编就在这里给大家简述下ssl证书的生成工具,然后再另外说下ssl证书的作用吧。
ssl证书的作用
ssl证书是数字证书的一种,类似于驾驶证、护照和营业执照的电子副本。
ssl证书的两大作用:数据加密和身份认证。
ssl 证书遵守 ssl协议,通过在客户端浏览器和web服务器之间建立一条ssl安全通道。
一个有效、可信的 ssl 数字证书包括一个公共密钥和一个私用密钥。公共密钥用于加密信息,私用密钥用于解译加密的信息。因此,浏览器指向一个安全域的时,ssl 将同步确认服务器和客户端,并创建一种加密方式和一个唯一的会话密钥。它们可以启动一个保证消息的隐私性和完整性的安全会话。
简述ssl证书生成工具
1.创建根证书密钥文件:
openssl genrsa -des3 -out root.key
输出内容为:
[lenin@archer ~]$ openssl genrsa -des3 -out root.keygenerating rsa private key, 512 bit long modulus……………..++++++++++++..++++++++++++e is 65537 (0×10001)enter pass phrase for root.key: ← 输入一个新密码verifying – enter pass phrase for root.key: ← 重新输入一遍密码
2.创建根证书的申请文件root.csr:
openssl req -new -key root.key -out root.csr
输出内容为:
[lenin@archer ~]$ openssl req -new -key root.key -out root.csrenter pass phrase for root.key: ← 输入前面创建的密码you are about to be asked to enter information that will be incorporatedinto 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 blankfor some fields there will be a default value,if you enter ‘.’, the field will be left blank.—–country name (2 letter code) [au]:cn ← 国家代号,中国输入cnstate or province name (full name) [some-state]:beijing ← 省的全名,拼音locality name (eg, city) []:beijing ← 市的全名,拼音organization name (eg, company) [internet widgits pty ltd]:mycompany corp. ← 公司英文名organizational unit name (eg, section) []: ← 可以不输入common name (eg, your name) []: ← 此时不输入email address []:admin@mycompany.com ← 电子邮箱,可随意填
please enter the following ‘extra’ attributesto be sent with your certificate requesta challenge password []: ← 可以不输入an optional company name []: ← 可以不输入
3.创建一个自当前日期起为期一年的根证书root.crt:
openssl x509 -req -days 365 -sha1 -extensions v3_ca -signkey root.key -in root.req -out root.crt
输出内容为:
[lenin@archer ~]$ openssl x509 -req -days 365 -sha1 -extensions v3_ca -signkey root.key -in root.csr -out root.crtsignature oksubject=/c=cn/st=beijing/l=beijing/o=mycompany corp./emailaddress=admin@mycompany.comgetting private keyenter pass phrase for root.key: ← 输入前面创建的密码
4.创建服务器证书密钥server.key:
openssl genrsa –des3 -out server.key 2048
输出内容为:
[lenin@archer ~]$ openssl genrsa -out server.key 2048generating rsa private key, 2048 bit long modulus….+++…………………………………………..+++e is 65537 (0×10001)
运行时会提示输入密码,此密码用于加密key文件(参数des3便是指加密算法,当然也可以选用其他你认为安全的算法.),以后每当需读取此文件(通过openssl提供的命令或api)都需输入口令.如果觉得不方便,也可以去除这个口令,但一定要采取其他的保护措施!去除key文件口令的命令:openssl rsa -in server.key -out server.key
5.创建服务器证书的申请文件server.csr:
openssl req -new -key server.key -out server.csr
输出内容为:
[lenin@archer ~]$ openssl req -new -key server.key -out server.reqyou are about to be asked to enter information that will be incorporatedinto 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 blankfor some fields there will be a default value,if you enter ‘.’, the field will be left blank.—–country name (2 letter code) [au]:cn ← 国家名称,中国输入cnstate or province name (full name) [some-state]:beijing ← 省名,拼音locality name (eg, city) []:beijing ← 市名,拼音organization name (eg, company) [internet widgits pty ltd]:mycompany corp. ← 公司英文名organizational unit name (eg, section) []: ← 可以不输入common name (eg, your name) []:www.mycompany.com ← 服务器主机名,若填写不正确,浏览器会报告证书无效,但并不影响使用email address []:admin@mycompany.com ← 电子邮箱,可随便填
please enter the following ‘extra’ attributesto be sent with your certificate requesta challenge password []: ← 可以不输入an optional company name []: ← 可以不输入
6.创建自当前日期起有效期为期两年的服务器证书server.crt:
openssl x509 -req -days 730 -sha1 -extensions v3_req -ca root.crt -cakey root.key -caserial root.srl -cacreateserial -in server.csr -out server.crt
输出内容为:
[lenin@archer ~]$ openssl x509 -req -days 730 -sha1 -extensions v3_req -ca root.crt -cakey root.key -ca
李彦宏——让世界刮目相看的中国企业家以下这些域名买来后过户后解析的如何抢注到期的域名?注册域名的步骤有哪些如何注册网站免费注册的方法是什么?网站的特点是什么?对于制作网站时在网址方面要重视起来域名解析无法访问怎么办?有什么解决方法?什么叫电商平台?电商平台有什么优势?备案新域名-备案平台