OpenSSL 簽發憑證方式

  • OpenSSL 版本 : openssl-0.9.8b-10.el5
openssl genrsa -des3 -out RootCA.key 2048
chmod og-rwx RootCA.key

看產生結果

openssl req -new -key RootCA.key -out RootCA.req

看產生結果

openssl x509 -req -days 3650 -sha1 -extensions v3_ca -signkey RootCA.key -in RootCA.req -out RootCA.crt
rm -f RootCA.req

看產生結果

openssl genrsa -out ServerCA.key 2048
chmod og-rwx ServerCA.key

看產生結果

openssl req -new -key ServerCA.key -out ServerCA.req

看產生結果

openssl x509 -req -days 730 -sha1 -extensions v3_req -CA RootCA.crt -CAkey RootCA.key  -CAserial RootCA.srl -CAcreateserial -in ServerCA.req -out ServerCA.crt
rm -f ServerCA.req

看產生結果

openssl genrsa -des3 -out ClientCA.key 2048
chmod og-rwx ClientCA.key

看產生結果

openssl req -new -key ClientCA.key -out ClientCA.req

看產生結果

openssl x509 -req -days 730 -sha1 -extensions v3_req -CA RootCA.crt -CAkey RootCA.key  -CAserial RootCA.srl -CAcreateserial -in ClientCA.req -out ClientCA.crt
rm -f ClientCA.req

看產生結果

openssl pkcs12 -export -in ClientCA.crt -inkey ClientCA.key -out ClientCA.pfx

看產生結果

  • 看到 apache 的 ssl_request_log 發現 IE7 使用 TLSv1 RC4-MD5, Firefox3 使用 SSLv3 DHE-RSA-AES256-SHA, cURL 7.15.5 使用 TLSv1 DHE-RSA-AES256-SHA
[root@pd920 httpd]# cat ssl_request_log
[20/Aug/2008:16:28:12 +0800] 192.168.11.248 TLSv1 RC4-MD5 "GET /t.txt HTTP/1.1" 25   <-- IE7
[20/Aug/2008:16:46:14 +0800] 192.168.11.248 SSLv3 DHE-RSA-AES256-SHA "GET /t.txt HTTP/1.1" 25  <-- Firefox3
[21/Aug/2008:12:18:55 +0800] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "GET /t.txt HTTP/1.1" 5 <-- cURL 7.15.5
[root@pd920 httpd]#
  • tech/openssl_caserver.txt
  • 上一次變更: 2021/01/17 16:46
  • jonathan