目錄表

申請 GCA SSL Apache 設備憑證

本文是依據 GCA 官方網站1), 實際處理的過程所整理程序.

GCA SSL 主機憑證申請流程圖

http://gca.nat.gov.tw/03-04-01.html

gcassl.jpg

產生 CSR 憑證請求檔程序

openssl genrsa -des3 -out server.key 1024
設定密碼
openssl req -new -days 1825 -key server.key -out server.csr
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]:Ministry of Economic Affairs,R.O.C.
Organizational Unit Name (eg, section) []:Information management center
Common Name (eg, your name or your server's hostname) []:ed.moea.gov.tw
Email Address []:[email protected]

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

上 GCA 網站申請 SSL 憑證程序

參考文件 http://gca.nat.gov.tw/download/sslServerAP_flow.pps

安裝 apache 安裝 SSL 憑證程序

參考文件 http://gca.nat.gov.tw/download/gca_ssl_cert_install_for_apache_modssl.pdf

1. 取得 GRCA 自簽憑證及 GCA 憑證之憑證串鏈

2. 完成 GRCA 自簽憑證及 GCA 憑證之憑證串鏈

openssl pkcs7 -in GRCA_GCA.p7b -inform DER -print_certs -out GRCA_GCA.pem
cp GRCA_GCA.pem /etc/pki/tls/certs/ca.crt
:
SSLCertificateChainFile /etc/pki/tls/certs/ca.crt
:

3. 安裝 SSL 伺服器軟體憑證

openssl x509 -in server.cer -inform DER -out server.pem
openssl rsa -in server.key -out mycert.pem  <- 輸入 PIN 碼
cp server.pem /etc/pki/tls/certs/server.crt
cp mycert.pem /etc/pki/tls/private/mycert.pem
:
SSLCertificateFile /etc/pki/tls/certs/server.crt
:
SSLCertificateKeyFile /etc/pki/tls/private/mycert.pem
:

4. 散佈 GRCA 自簽憑證到用戶端

<OBJECT data="http://grca.nat.gov.tw/pse/InstallRootCert.html" type="text/html">
</OBJECT>
3) , 5)
Base64 編碼格式
4) , 6)
vi /etc/http/conf.d/ssl.conf