跳至內容
阿里BaBa電腦筆記
使用者工具
登入
網站工具
工具
顯示頁面
舊版
反向連結
最近更新
多媒體管理器
網站地圖
登入
最近更新
多媒體管理器
網站地圖
足跡:
linux:encrypt:openssl
本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。
======Openssl====== 本範例以Centos6為基礎。 ======建立根憑證====== - 建立私鑰SSL key<code 1>#cd /etc/pki/tls/certs/</code><code 1>#openssl genrsa -des3 -out rootca.key 1024 輸入兩次密碼 </code> - 建立憑證申請書SSL CSR<code 1>#openssl req -new rootca.key -out root.csr 輸入一次密碼 ou are about to be asked to enter information that will be incorporated into 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 blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:TW #國碼 State or Province Name (full name) []:Taiwan R.O.C #完整州,地區名稱 Locality Name (eg, city) [Default City]:Taichung #城市名 Organization Name (eg, company) [Default Company Ltd]:Qoop #公司名稱 Organizational Unit Name (eg, section) []:Salse #組織單位 Common Name (eg, your name or your server's hostname) []:rpm32.Qoop.com #完整主機名稱 Email Address []:root@Qoop.com #聯絡的Mail Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: #按Enter即可 An optional company name []: #按Enter即可 </code> - 建立RootCA自己簽發給自己 SSL crt<code 1>#openssl x509 -req -signkey rootca.key -in rootca.csr -out rootca.crt Signature ok subject=/C=TW/ST=Taiwan R.O.C/L=Taichung/O=Qoop/OU=Salse/CN=rpm32.Qoop.com/emailAddress=root@Qoop.com Getting Private key Enter pass phrase for rootca.key: # 輸入第一步驟的密碼 </code> ======為伺服器建立專用的憑證====== - SSL key: <code 1>#openssl genrsa -out server.key 1024 </code> - SSL CSR:<code 1>#openssl req -new -key server.key -out server.csr 與第二大項步驟一樣 ~略~ Country Name (2 letter code) [XX]:TW State or Province Name (full name) []:Taiwan R.O.C Locality Name (eg, city) [Default City]: ~略~ </code> - SSL crt:<code 1>#openssl x509 -req -CAcreateserial -CAkey rootca.key -CA rootca.crt -in server.csr -out server.crt Enter pass phrase for rootca.key: #輸入rootca.key的私鑰密碼 </code> ======參考資料====== - [[http://benjr.tw/node/108|Benjr_CA]] - [[http://www.weithenn.org/cgi-bin/wiki.pl?OpenLDAP-Postfix_With_SMTP_SSL_TLS_%E8%A8%AD%E5%AE%9A#Heading4|OpenLDAP-Postfix With SMTP SSL TLS 設定]] - [[http://www.ichiayi.com/wiki/tech/openssl_caserver?s[]=ssl|OpenSSL 簽發憑證方式]] - [[http://security.nknu.edu.tw/textbook/|網路安全與實務理論-PGP/GnuPG-楊中皇]]
linux/encrypt/openssl.txt
· 上一次變更: 2013/07/06 01:28 (外部編輯)
頁面工具
顯示頁面
舊版
反向連結
回到頁頂