Advanced Interdisciplinary Projects Lab(AIPLab) 討論區

Please login or register.

請輸入帳號, 密碼以及預計登入時間

新聞:

[慶賀]恭喜亞大獲《泰晤士報》亞洲最佳大學排名第83名,國內排名第十名-20170201

作者 主題: How to create .pem files for https web server  (閱讀 135 次)

admin

  • 管理員
  • Hero Member
  • *****
  • 文章: 1691
    • 檢視個人資料
How to create .pem files for https web server
« 於: 十二月 20, 2016, 11:59:44 pm »
create the folder where you want to store your key & certificate :

程式碼: [Select]
mkdir confgo to that directory :

程式碼: [Select]
cd confgrab this ca.cnf file to use as a configuration shortcut :

程式碼: [Select]
wget https://raw.githubusercontent.com/anders94/https-authorized-clients/master/keys/ca.cnfcreate a new certificate authority using this configuration :

程式碼: [Select]
openssl req -new -x509 -days 5999 -config ca.cnf -keyout ca-key.pem -out ca-cert.pem
now that we have our certificate authority in ca-key.pem and ca-cert.pem, let's generate a private key for the server :

程式碼: [Select]
openssl genrsa -out key.pem 4096grab this server.cnf file to use as a configuration shortcut :

程式碼: [Select]
wget https://raw.githubusercontent.com/anders94/https-authorized-clients/master/keys/server.cnfgenerate the certificate signing request using this configuration :

程式碼: [Select]
openssl req -new -config server.cnf -key key.pem -out csr.pemsign the request :

程式碼: [Select]
openssl x509 -req -extfile server.cnf -days 999 -passin "pass:password" -in csr.pem -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out cert.pem
« 最後編輯時間: 十二月 21, 2016, 12:33:07 am 由 admin »
已記錄

admin

  • 管理員
  • Hero Member
  • *****
  • 文章: 1691
    • 檢視個人資料
回覆: How to create .pem files for https web server
« 回覆文章 #1 於: 十二月 21, 2016, 02:06:48 am »
SSL For Free 免費 SSL 憑證申請
https://free.com.tw/ssl-for-free/
已記錄
 

SimplePortal Classic 2.0.5