茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1671782 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
PIMG_00344.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2010/12/2 6:40:32
幫 Linux 向企業 CA 申請網頁伺服器憑證(適用 Fedora Core 7)

 一般中大型企業會用 Windows 架設企業內部 CA Server,在 IIS 上申請憑證沒什麼太大問題,而 Linux 要如何向 Windows 的 CA Server 申請網頁伺服器憑證呢?



一、建立申請憑證
 1. 建立私密金鑰 Server.key
   # openssl genrsa –out server.key 1024
  Generating RSA private key, 1024 bit long modulus
  ....................................................................++++++
  ....++++++
  e is 65537 (0x10001)


 2. 建立 Server.csr 憑證申請
   # openssl req –new –key server.key –out server.csr

  You 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) [GB]: TW  <- 國家
  State or Province Name (full name) [Berkshire]: Taiwan  <- 省份
  Locality Name (eg, city) [Newbury]: Taipei  <- 城市
  Organization Name (eg, company) [My Company Ltd]: XYZ  <-公司名稱
  Organizational Unit Name (eg, section) []: MIS  <- 單位名稱

  Common Name (eg, your name or your server's hostname) []: www.abc.com.tw  <- 網站的 FQDN
  Email Address []: service@abc.com.tw  <- 管理者Mail

  Please enter the following 'extra' attributes
  to be sent with your certificate request
  A challenge password []:  <- 直接按"Enter"
  An optional company name []:  <- 直接按"Enter"


 3. 執行後將產生 server.csr 檔案,此檔案要交給企業 CA 或第三方公信單位產生 Server.crt 憑證。


二、申請網頁伺服器憑證
 1. 開啟企業 CA 憑證申請網頁,點選 「要求憑證」


 2. 點選 「進階憑證要求」

 3. 點選 「用 Base-64 編碼的 CMC 或 PKCS #10 檔案來提交憑證......更新要求」

 4. 將 Linux 上產生的 server.csr 內容,貼到 「Base-64 編碼的憑證要求」內,並將憑證範本選擇 「網頁伺服器」
(註:如果看不到網頁伺服器選項,表示使用一般使用者身份申請憑證,請切換使用者身份為 Domain Admin,重新申請),然後點選 「提交」送出憑證申請。

 5. 選擇 DER 編碼或 Base 64 編碼都可以,點選 「下載憑證」,儲存申請好的 certnew.cer 網頁伺服器憑證。


三、安裝憑證
 1. 將申請下來的 certnew.cer 複製到 Linux 上,並將副檔名更改為 certnew.crt。


 2. 將 certnew.crt 搬移到憑證存放路徑下:
   /etc/pki/tls/certs/  <- 各 Linux 版本路徑不同



 3. 將剛才在 Linux 上所產生的 server.key 搬移到金鑰存放路徑下:
   /etc/pki/tls/private/  <- 各 Linux 版本路徑不同


 4. 編輯 /etc/httpd/conf.d/ssl.conf
   SSLCertificateFile /etc/pki/tls/certs/certnew.crt  <- 修改新的憑證名稱
   SSLCertificateKeyFile /etc/pki/tls/private/server.key  <- 修改新的金鑰名稱


 5. 重新啟動服務 service httpd restart
 


原文出處:Gavin's Linux學習手札: 幫 Linux 向企業 CA 申請網頁伺服器憑證(適用 Fedora Core 7) - yam天空部落
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|