http通過openssl轉https

來源:互聯網
上載者:User

標籤:cer   服務   new   ica   efault   htm   serial   val   ati   

1.建立CA伺服器

詳情可以參考我的另一篇文章 : http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_linux_011_ca.html

1.1 建立必要的目錄和檔案

[[email protected] CA]# mkdir csr crl newcerts[[email protected] CA]# touch index.txt serial[[email protected] CA]# echo 01>serial

1.2 修改預設配置

[[email protected] CA]# vim /etc/pki/tls/openssl.cnf #編輯以下行, 設定預設的國家,省,城市,組織名,部門名countryName_default             = CNstateOrProvinceName_default     = HeNanlocalityName_default    = ZhengZhouorganizationName_default        = ZKYTorganizationalUnitName_default  = Tech  

1.3產生自簽認證

[[email protected] CA]# (umask 077;openssl  genrsa -out private/cakey.pem 2048)Generating RSA private key, 2048 bit long modulus........................................................................................................................................+++...+++e is 65537 (0x10001)[[email protected] CA]# openssl req -new -x509 -key private/cakey.pem -out cacert.pem -days 3650You 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) [CN]:State or Province Name (full name) [HeNan]:Locality Name (eg, city) [ZhengZhou]:Organization Name (eg, company) [ZKYT]:Organizational Unit Name (eg, section) [Tech]:Common Name (eg, your name or your server‘s hostname) []:ca.linuxpanda.comEmail Address []:

 

http通過openssl轉https

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.