centOS系統產生SSL數位憑證

來源:互聯網
上載者:User

標籤:

SSL認證是數位憑證的一種,類似於駕駛證、護照和營業執照的電子副本。因為配置在伺服器上,也稱為SSL伺服器憑證。SSL 憑證就是遵守 SSL協議,由受信任的數位憑證頒發機構CA(如GlobalSign,wosign),在驗證伺服器身份後頒發,具有伺服器身分識別驗證和資料轉送加密功能。採用1024位RSA非對稱式加密演算法進行加密。

 

1.查看是否安裝httpd和SSL(如果有就可以進行下一步)

 

[root@localhost ~]# rpm -qa | grep httpd httpd-tools-2.2.15-47.el6.centos.4.x86_64[root@localhost ~]# rpm -qa | grep sslopenssl-1.0.1e-42.el6_7.4.x86_64openssl-devel-1.0.1e-42.el6_7.4.x86_64docbook-style-dsssl-1.79-10.el6.noarchmod_ssl-2.2.15-47.el6.centos.4.x86_64nss_compat_ossl-0.9.6-1.el6.x86_64

 

2.產生伺服器私密金鑰

 

[root@localhost /]# cd  /etc/pki/tls[root@localhost tls]# openssl genrsa -out server.key 1024Generating RSA private key, 1024 bit long modulus.............++++++...........................++++++e is 65537 (0x10001)

 

3.用私密金鑰server.key檔案產生認證請求檔案csr 

 

[root@localhost tls]# openssl req -new -key server.key -out server.csrCountry Name (2 letter code) [XX]:Chinastring is too long, it needs to be less than 2 bytes longCountry Name (2 letter code) [XX]:CNState or Province Name (full name) []:zhejiangLocality Name (eg, city) [Default City]:hangzhouOrganization Name (eg, company) [Default Company Ltd]:CQOrganizational Unit Name (eg, section) []:cqxxCommon Name (eg, your name or your server‘s hostname) []:www.jbhjbh.comEmail Address []:cuilingli@jbhjbh.com

 

上面的步驟完成之後會讓你輸入一個密碼:

A challenge password []:An optional company name []:

不用理他直接斷行符號

 

4.產生認證檔案

[root@localhost tls]# openssl x509 -days 365 -req -in server.csr -signkey server.key -out server.crt

結果如下

Signature oksubject=/C=CN/ST=zhejiang/L=hangzhou/O=CQ/OU=cqxx/CN=www.jbhjbh.com/emailAddress=cuilingli@jbhjbh.comGetting Private key

 

centOS系統產生SSL數位憑證

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.