vi /etc/httpd/conf.d/ssl.conf
:
LoadModule ssl_module modules/mod_ssl.so
:
SSLMutex default
:
SSLCertificateFile /etc/pki/tls/certs/ServerCA.crt
SSLCertificateKeyFile /etc/pki/tls/certs/ServerCA.key
SSLCACertificateFile /etc/pki/tls/certs/RootCA.crt
:
SSLVerifyClient require
SSLVerifyDepth 1
:
openssl rsa -in /etc/pki/tls/certs/ServerCA.key -out /etc/pki/tls/certs/ServerCA.pem
Enter pass phrase for private/svncert.key: <- 輸入 Pin Code
writing RSA key <- 完成
vi /etc/httpd/conf.d/ssl.conf
:
SSLCertificateKeyFile /etc/pki/tls/certs/ServerCA.pem
:
可以在 ssl.conf 內增加以下參數
:
SSLCARevocationFile /etc/pki/tls/crl/ca-bundle-client.crl
:
下載 crl 檔加入 /etc/pki/tls/crl/ca-bundle-client.crl, 以下以
OpenSSL 廢止憑證方式 內的 trysoft.crl 當範例
openssl crl -inform PEM -in trysoft.crl -text -CAfile /etc/pki/tls/certs/RootCA.crt > CRL.pem
cat CRL.pem >> /etc/pki/tls/crl/ca-bundle-client.crl
更改 ssl.conf 要重新啟動 Apache 才會生效, 以下是使用已經廢止的 ClientCA 憑證連線錯誤訊息
[jonathan@pd920 certs]$ curl --cert ClientCA.pem https://mail.ichiayi.com/t.txt
Enter PEM pass phrase:
curl: (35) error:14094414:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate revoked