只需簡(jiǎn)單幾步即可生成ssl證書生成工具

ssl證書生成工具是什么?想必都知道無論申請(qǐng)的是免費(fèi)SSL證書還是ca頒發(fā)的SSL證書,都是要安裝并生成證書方能正常使用。生成SSL證書的步驟也有所不同,有簡(jiǎn)單也有復(fù)雜的,那接下來,小編就在這里給大家簡(jiǎn)述下ssl證書的生成工具,然后再另外說下SSL證書的作用吧。

創(chuàng)新互聯(lián)主營(yíng)尉犁網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,成都APP應(yīng)用開發(fā),尉犁h5小程序制作搭建,尉犁網(wǎng)站營(yíng)銷推廣歡迎尉犁等地區(qū)企業(yè)咨詢SSL證書的作用
SSL證書是數(shù)字證書的一種,類似于駕駛證、護(hù)照和營(yíng)業(yè)執(zhí)照的電子副本。
SSL證書的兩大作用:數(shù)據(jù)加密和身份認(rèn)證。
SSL 證書遵守 SSL協(xié)議,通過在客戶端瀏覽器和Web服務(wù)器之間建立一條SSL安全通道。
一個(gè)有效、可信的 SSL 數(shù)字證書包括一個(gè)公共密鑰和一個(gè)私用密鑰。公共密鑰用于加密信息,私用密鑰用于解譯加密的信息。因此,瀏覽器指向一個(gè)安全域的創(chuàng)新互聯(lián)時(shí),SSL 將同步確認(rèn)服務(wù)器和客戶端,并創(chuàng)建一種加密方式和一個(gè)唯一的會(huì)話密鑰。它們可以啟動(dòng)一個(gè)保證消息的隱私性和完整性的安全會(huì)話。

簡(jiǎn)述ssl證書生成工具
1.創(chuàng)建根證書密鑰文件:
openssl genrsa -des3 -out root.key
輸出內(nèi)容為:

[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: ← 輸入一個(gè)新密碼Verifying – Enter pass phrase for root.key: ← 重新輸入一遍密碼

2.創(chuàng)建根證書的申請(qǐng)文件root.csr:
openssl req -new -key root.key -out root.csr
輸出內(nèi)容為:
[lenin@archer ~]$ openssl req -new -key root.key -out root.csrEnter pass phrase for root.key: ← 輸入前面創(chuàng)建的密碼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 ← 國(guó)家代號(hào),中國(guó)輸入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) []: ← 此時(shí)不輸入Email Address []:admin@mycompany.com ← 電子郵箱,可隨意填
Please enter the following ‘extra’ attributesto be sent with your certificate requestA challenge password []: ← 可以不輸入An optional company name []: ← 可以不輸入
3.創(chuàng)建一個(gè)自當(dāng)前日期起為期一年的創(chuàng)新互聯(lián)根證書root.crt:
openssl x509 -req -days 365 -sha1 -extensions v3_ca -signkey root.key -in root.req -out root.crt
輸出內(nèi)容為:
[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: ← 輸入前面創(chuàng)建的密碼
4.創(chuàng)建服務(wù)器證書密鑰server.key:
openssl genrsa –des3 -out server.key 2048
輸出內(nèi)容為:
[lenin@archer ~]$ openssl genrsa -out server.key 2048Generating RSA private key, 2048 bit long modulus….+++…………………………………………..+++e is 65537 (0×10001)
運(yùn)行時(shí)會(huì)提示輸入密碼,此密碼用于加密key文件(參數(shù)des3便是指加密算法,當(dāng)然也可以選用其他你認(rèn)為安全的算法.),以后每當(dāng)需讀取此文件(通過openssl提供的命令或API)都需輸入口令.如果覺得不方便,也可以去除這個(gè)口令,但一定要采取其他的保護(hù)措施!去除key文件口令的命令:openssl rsa -in server.key -out server.key
5.創(chuàng)建服務(wù)器證書的申請(qǐng)文件server.csr:
openssl req -new -key server.key -out server.csr
輸出內(nèi)容為:
[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 ← 國(guó)家名稱,中國(guó)輸入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 ← 服務(wù)器主機(jī)名,若填寫不正確,瀏覽器會(huì)報(bào)告證書無效,但并不影響使用Email Address []:admin@mycompany.com ← 電子郵箱,可隨便填
Please enter the following ‘extra’ attributesto be sent with your certificate requestA challenge password []: ← 可以不輸入An optional company name []: ← 可以不輸入
6.創(chuàng)建自當(dāng)前日期起有效期為期兩年的服務(wù)器證書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
輸出內(nèi)容為:
[lenin@archer ~]$ openssl x509 -req -days 730 -sha1 -extensions v3_req -CA root.crt -CAkey root.key -CAcreateserial -in server.csr -out server.crtSignature oksubject=/C=CN/ST=BeiJing/L=BeiJing/O=MyCompany Corp./CN=www.mycompany.com/emailAddress=admin@mycompany.comGetting CA Private KeyEnter pass phrase for root.key: ← 輸入前面創(chuàng)建的密碼
7.創(chuàng)建客戶端證書密鑰文件client.key:
openssl genrsa -des3 -out client.key 2048
輸出內(nèi)容為:
[lenin@archer ~]$ openssl genrsa -des3 -out client.key 2048Generating RSA private key, 2048 bit long modulus……………………………………………………………………………..+++……………………………………………………………………………………………………….+++e is 65537 (0×10001)Enter pass phrase for client.key: ← 輸入一個(gè)新密碼Verifying – Enter pass phrase for client.key: ← 重新輸入一遍密碼
8.創(chuàng)建客戶端證書的申請(qǐng)文件client.csr:
openssl req -new -key client.key -out client.csr
輸出內(nèi)容為:
[lenin@archer ~]$ openssl req -new -key client.key -out client.csrEnter pass phrase for client.key: ← 輸入上一步中創(chuàng)建的密碼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 ← 國(guó)家名稱,中國(guó)輸入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) []:Lenin ← 自己的英文名,可以隨便填Email Address []:admin@mycompany.com ← 電子郵箱,可以隨便填
Please enter the following ‘extra’ attributesto be sent with your certificate requestA challenge password []: ← 可以不填A(yù)n optional company name []: ← 可以不填
9.創(chuàng)建一個(gè)自當(dāng)前日期起有效期為兩年的客戶端證書client.crt:
openssl x509 -req -days 730 -sha1 -extensions v3_req -CA root.crt -CAkey root.key -CAserial root.srl -CAcreateserial -in client.csr -out client.crt
輸出內(nèi)容為:
[lenin@archer ~]$ openssl x509 -req -days 730 -sha1 -extensions v3_req -CA root.crt -CAkey root.key -CAcreateserial -in client.csr -out client.crtSignature oksubject=/C=CN/ST=BeiJing/L=BeiJing/O=MyCompany Corp./CN=www.mycompany.com/emailAddress=admin@mycompany.comGetting CA Private KeyEnter pass phrase for root.key: ← 輸入上面創(chuàng)建的密碼
10.將客戶端證書文件client.crt和客戶端證書密鑰文件client.key合并成客戶端證書安裝包c(diǎn)lient.pfx:
openssl pkcs12 -export -in client.crt -inkey client.key -out client.pfx
輸出內(nèi)容為:
[lenin@archer ~]$ openssl pkcs12 -export -in client.crt -inkey client.key -out client.pfxEnter pass phrase for client.key: ← 輸入上面創(chuàng)建的密碼Enter Export Password: ← 輸入一個(gè)新的密碼,用作客戶端證書的保護(hù)密碼,在客戶端安裝證書時(shí)需要輸入此密碼Verifying – Enter Export Password: ← 確認(rèn)密碼
11.保存生成的文件備用,其中server.crt和server.key是配置單向SSL時(shí)需要使用的證書文件,client.crt是配置雙向SSL時(shí)需要使用的證書文件,client.pfx是配置雙向SSL時(shí)需要客戶端安裝的證書文件
.crt文件和.key可以合到一個(gè)文件里面,把2個(gè)文件合成了一個(gè).pem文件(直接拷貝過去就行了)

ssl證書工具
SSL證書概述
SSL證書是數(shù)字證書的一種,類似于駕駛證、護(hù)照和營(yíng)業(yè)執(zhí)照的電子副本。因?yàn)榕渲迷诜?wù)器上,也稱為SSL服務(wù)器證書。
SSL 證書就是遵守SSL協(xié)議,由受信任的數(shù)字證書頒發(fā)機(jī)構(gòu)CA,在驗(yàn)證服務(wù)器身份后頒發(fā),具有服務(wù)器身份驗(yàn)證和數(shù)據(jù)傳輸加密功能。

SSL證書通過在客戶端瀏覽器和Web服務(wù)器之間建立一條SSL安全通道(Secure socket layer(SSL)安全協(xié)議是由Netscape Communication公司設(shè)計(jì)開發(fā)。該安全協(xié)議主要用來提供對(duì)用戶和服務(wù)器的認(rèn)證;對(duì)傳送的數(shù)據(jù)進(jìn)行加密和隱藏;確保數(shù)據(jù)在傳送中不被改變,即數(shù)據(jù)的完整性,現(xiàn)已成為該領(lǐng)域中全球化的標(biāo)準(zhǔn)。由于SSL技術(shù)已建立到所有主要的瀏覽器和WEB服務(wù)器程序中,因此,僅需安裝服務(wù)器證書就可以激活該功能了),即通過它可以激活SSL協(xié)議,實(shí)現(xiàn)數(shù)據(jù)信息在客戶端和服務(wù)器之間的加密傳輸,可以防止數(shù)據(jù)信息的泄露,保證了雙方傳遞信息的安全性,而且用戶可以通過服務(wù)器證書驗(yàn)證他所訪問的網(wǎng)站是否是真實(shí)可靠。數(shù)字簽名又名數(shù)字標(biāo)識(shí)、簽章 (即 Digital Certificate,Digital ID ),提供了一種在網(wǎng)上進(jìn)行身份驗(yàn)證的方法,是用來標(biāo)志和證明網(wǎng)絡(luò)通信雙方身份的數(shù)字信息文件,概念類似日常生活中的司機(jī)駕照或身份證。 數(shù)字簽名主要用于發(fā)送安全電子郵件、訪問安全站點(diǎn)、網(wǎng)上招標(biāo)與投標(biāo)、網(wǎng)上簽約、網(wǎng)上訂購、網(wǎng)上公文安全傳送、網(wǎng)上辦公、網(wǎng)上繳費(fèi)、網(wǎng)上繳稅以及網(wǎng)上購物等安全的網(wǎng)上電子交易活動(dòng)。

以上就是小編給大家簡(jiǎn)述的ssl證書生成工具和SSL證書的作用的全部?jī)?nèi)容,本站的文章中還有很多關(guān)于ssl證書的相關(guān)文章,如果想深入了解ssl證書,就請(qǐng)關(guān)注下本站吧。

網(wǎng)站題目:只需簡(jiǎn)單幾步即可生成ssl證書生成工具
網(wǎng)頁URL:http://muchs.cn/article6/chgjog.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、虛擬主機(jī)、用戶體驗(yàn)手機(jī)網(wǎng)站建設(shè)、做網(wǎng)站、云服務(wù)器

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司