中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

國(guó)密 SM2 SSL 證書 Nginx 安裝指南 linux版

一、獲取國(guó)密證書

1、在您完成申請(qǐng)西部GDCA服務(wù)器證書的流程后,下載證書將獲取一個(gè)證書包,有以下

*.***.com_sign.crt:簽名證書

*.***.com_sign.key:簽名證書私鑰

*.***.com_encrypt.crt:加密證書

*.***.com_encryptKeyData.txt:內(nèi)容為已加密的加密證書私鑰片段

image.png

2、加密證書解密

在線解密:https://myssl.com/key_encryption_decryption.html#tc_cert

簽名私鑰對(duì)應(yīng)下載證書(三個(gè)文件)中的key.

image.png

image.png

創(chuàng)建 *.**.com_encrypt.key 文件,將獲取的解密后 解密證書私鑰 內(nèi)容填寫進(jìn)去。


二、部署國(guó)密nginx


國(guó)密OpenSSL與國(guó)密Nginx

gmssl_openssl_1.1_bxx.tar.gz

無(wú)縫nginx國(guó)密改造,支持nginx1.6+


編譯部署(以nginx-1.18.0為例)


1) 下載 wget http://download.myhostadmin.net/gmssl/gmssl_openssl_1.1_b8.tar.gz到/root/下xxxxxxxx
(備用下載地址:http://downinfo.myhostadmin.net/gmssl/gmssl_openssl_1.1_b8.tar.gz)

2) 解壓 tar xzfm gmssl_openssl_1.1_b8.tar.gz -C /usr/local
3) 下載wget http://download.myhostadmin.net/gmssl/nginx-1.18.0.zip 到/root/下

(備用下載地址:http://downinfo.myhostadmin.net/gmssl/nginx-1.18.0.zip

4) 解壓 unzip nginx-1.18.0.zip

注:可能需要使用yum install pcre-devel需要安裝pcre-devel

5) 進(jìn)入目錄 cd /root/nginx-1.18.0

6) 編譯配置

./configure \
--without-http_gzip_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_v2_module \
--with-file-aio \
--with-openssl="/usr/local/gmssl" \
--with-cc-opt="-I/usr/local/gmssl/include" \
--with-ld-opt="-lm"


7) 編譯安裝
make install
8) /usr/local/nginx即為生成的nginx目錄

9)編譯安裝完成后,cd 進(jìn)入/usr/local/nginx/sbin 目錄,用 ./nginx -t 命令檢測(cè)是否正常,如下:

image.png



配置示例(國(guó)密單向)


*.***.com_sign.crt:簽名證書

*.***.com_sign.key:簽名證書私鑰

*.***.com_encrypt.crt:加密證書

*.***.com_encrypt.key : 加密證書私鑰


server
{
  listen 0.0.0.0:443 ssl;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:AES128-SHA:DES-CBC3-SHA:ECC-SM4-CBC-SM3:ECC-SM4-GCM-SM3;
  ssl_verify_client off;

  ssl_certificate /usr/local/nginx/conf/*.***.com_sign.crt;
  ssl_certificate_key /usr/local/nginx/conf/*.***.com_sign.key;

  ssl_certificate /usr/local/nginx/conf/*.***.com_encrypt.crt;
  ssl_certificate_key /usr/local/nginx/conf/*.***.com_encrypt.key;

  location /
  {
    root html;
    index index.html index.htm;
  }
}



配置示例(國(guó)密/RSA單向自適應(yīng))

server
{
  listen 0.0.0.0:443 ssl;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:AES128-SHA:DES-CBC3-SHA:ECC-SM4-CBC-SM3:ECC-SM4-GCM-SM3;
  ssl_verify_client off;

  ssl_certificate /usr/local/nginx/conf/*.***.com.crt;
  ssl_certificate_key /usr/local/nginx/conf/*.***.com.key;

  ssl_certificate /usr/local/nginx/conf/*.***.com_sign.crt;
  ssl_certificate_key /usr/local/nginx/conf/*.***.com_sign.key;

  ssl_certificate /usr/local/nginx/conf/*.***.com_encrypt.crt;
  ssl_certificate_key /usr/local/nginx/conf/*.***.com_encrypt.key;  location /
  {
    root html;
    index index.html index.htm;
  }
}


測(cè)試配置是否正確/usr/local/nginx/sbin/nginx -t

image.png

啟動(dòng)/usr/local/nginx/sbin/nginx

image.png


三、訪問(wèn)測(cè)試


1、360企業(yè)瀏覽器 設(shè)置,打開(kāi)瀏覽器點(diǎn)擊右上角的按鈕-》“選項(xiàng)”-》“安全設(shè)置”,確!皣(guó)密通信協(xié)議”欄目已勾選

“啟用國(guó)密SSL協(xié)議支持”的復(fù)選框,如下: 

image.png

訪問(wèn)效果示例:

image.png


編輯:西部數(shù)碼
日期:2023-09-20

收藏 】 【 打印 】   
您可對(duì)文檔進(jìn)行評(píng)分喲~

勾選遇到的問(wèn)題提交給我們,收到反饋后保證及時(shí)修正更新!

提交反饋需要先登陸會(huì)員帳號(hào)

上一篇:釋放拍賣賣家規(guī)則
下一篇:網(wǎng)站批量替換關(guān)鍵詞方法
若文檔內(nèi)容對(duì)您沒(méi)有幫助,不能解決問(wèn)題? 您還可以 咨詢?cè)诰客服提交工單搜索常見(jiàn)問(wèn)題 ,我們將竭誠(chéng)為您服務(wù)。
  >> 相關(guān)文章
 
分享至:
Top

24小時(shí)客服熱線

400-028-****

028-6277****

抱歉,午餐時(shí)間暫時(shí)無(wú)法接聽(tīng)您的電話,建議您提交工單或13:00以后再電話咨詢,謝謝!

抱歉,當(dāng)前是午餐時(shí)間,請(qǐng)?jiān)?3:00以后咨詢。若有網(wǎng)站打不開(kāi)、網(wǎng)絡(luò)中斷等緊急問(wèn)題請(qǐng)致電028-62778877-7