<samp id="tdkee"></samp>

    <mark id="tdkee"><acronym id="tdkee"></acronym></mark>

  1. 免费看又黄又无码的网站_久久久高清国产免费观看_亚洲一区二区三区在线免费观看_免费欧洲美女a视频一级毛片_日本最新免费二区三区

    ×

    ssl證書(shū)使用方法以及SSL證書(shū)的作用

    分類(lèi):建站推廣 編輯:虛機(jī)世界 瀏覽量:107
    2021-04-15 15:58:08

      無(wú)論是申請(qǐng)免費(fèi)的或CA簽發(fā)的SSL證書(shū),都需要安裝生成后才能正常使用。生成SSL證書(shū)的步驟從簡(jiǎn)單到復(fù)雜各不相同。那接下來(lái)小編就給朋友們先講述下一般ssl證書(shū)生成方法以及SSL證書(shū)的作用,想要進(jìn)一步了解ssl證書(shū)生成的朋友們,趕緊過(guò)來(lái)看一下,別錯(cuò)過(guò)了。


      SSL證書(shū)生成
      1.創(chuàng)建根證書(shū)密鑰文件:
      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)建根證書(shū)的申請(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)前日期起為期一年的根證書(shū)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ù)器證書(shū)密鑰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)需讀取此文件(通過(guò)openssl提供的命令或API)都需輸入口令.如果覺(jué)得不方便,也可以去除這個(gè)口令,但一定要采取其他的保護(hù)措施!去除key文件口令的命令:openssl rsa -in server.key -out server.key
      5.創(chuàng)建服務(wù)器證書(shū)的申請(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ó)家名稱(chēng),中國(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ī)名,若填寫(xiě)不正確,瀏覽器會(huì)報(bào)告證書(shū)無(wú)效,但并不影響使用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ù)器證書(shū)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)建客戶(hù)端證書(shū)密鑰文件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)建客戶(hù)端證書(shū)的申請(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ó)家名稱(chēng),中國(guó)輸入CNState or Province Name (full name) [Some-State]:BeiJing ← 省名稱(chēng),拼音Locality Name (eg, city) []:BeiJing ← 市名稱(chēng),拼音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)前日期起有效期為兩年的客戶(hù)端證書(shū)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.將客戶(hù)端證書(shū)文件client.crt和客戶(hù)端證書(shū)密鑰文件client.key合并成客戶(hù)端證書(shū)安裝包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ū)的保護(hù)密碼,在客戶(hù)端安裝證書(shū)時(shí)需要輸入此密碼Verifying – Enter Export Password: ← 確認(rèn)密碼
      11.保存生成的文件備用,其中server.crt和server.key是配置單向SSL時(shí)需要使用的證書(shū)文件,client.crt是配置雙向SSL時(shí)需要使用的證書(shū)文件,client.pfx是配置雙向SSL時(shí)需要客戶(hù)端安裝的證書(shū)文件
      .crt文件和.key可以合到一個(gè)文件里面,把2個(gè)文件合成了一個(gè).pem文件(直接拷貝過(guò)去就行了)
     
    ssl證書(shū)生成
      SSL證書(shū)的作用
      SSL證書(shū)是數(shù)字證書(shū)的一種,類(lèi)似于駕駛證、護(hù)照和營(yíng)業(yè)執(zhí)照的電子副本。
      SSL證書(shū)的兩大作用:數(shù)據(jù)加密和身份認(rèn)證
      SSL 證書(shū)遵守 SSL協(xié)議,通過(guò)在客戶(hù)端瀏覽器和Web服務(wù)器之間建立一條新網(wǎng)SSL安全通道
      一個(gè)有效、可信的 SSL 數(shù)字證書(shū)包括一個(gè)公共密鑰和一個(gè)私用密鑰。公共密鑰用于加密信息,私用密鑰用于解譯加密的信息。因此,瀏覽器指向一個(gè)安全域時(shí),SSL 將同步確認(rèn)服務(wù)器和客戶(hù)端,并創(chuàng)建一種新網(wǎng)加密方式和一個(gè)唯一的會(huì)話(huà)密鑰。它們可以啟動(dòng)一個(gè)保證消息的隱私性和完整性的安全會(huì)話(huà)。
     
    ssl證書(shū)生成
      SSL證書(shū)包括
      1,CA證書(shū),也叫根證書(shū)或者中間級(jí)證書(shū)。如果是單向https認(rèn)證的話(huà),該證書(shū)是可選的。不安裝CA證書(shū)的話(huà),瀏覽器默認(rèn)是不安全的。
      2,服務(wù)器證書(shū),必選項(xiàng)。通過(guò)key,證書(shū)請(qǐng)求文件csr,再通過(guò)CA證書(shū)簽名,生成服務(wù)器證書(shū)。
      以上就是ssl證書(shū)生成方法以及SSL證書(shū)的作用,對(duì)于SSL證書(shū)安裝步驟相對(duì)簡(jiǎn)單。但是OV SSL和EV SSL證書(shū)的安裝就相對(duì)比較復(fù)雜了,數(shù)據(jù)審計(jì)也比較嚴(yán)格。如果不了解這方面,建議還是找專(zhuān)業(yè)人士幫忙安裝。


    聲明:免責(zé)聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶(hù)自發(fā)貢獻(xiàn)自行上傳,本網(wǎng)站不擁有所有權(quán),也不承認(rèn)相關(guān)法律責(zé)任。如果您發(fā)現(xiàn)本社區(qū)中有涉嫌抄襲的內(nèi)容,請(qǐng)發(fā)

    送郵件至:operations@xinnet.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),本站將立刻刪除涉嫌侵權(quán)內(nèi)容。本站原創(chuàng)內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)

    需注明出處:新網(wǎng)idc知識(shí)百科

    免費(fèi)咨詢(xún)獲取折扣

    Loading
    国产精品视频白浆免费视频_久久久高清国产免费观看_亚洲一区二区三区在线免费观看_免费欧洲美女a视频一级毛片

    <samp id="tdkee"></samp>

      <mark id="tdkee"><acronym id="tdkee"></acronym></mark>