まず第一に、どのアプリケーションでもあなたの自己署名ルート CA 証明書を 絶対に使わないこと。特に apache では、あなたの秘密鍵のパスフレーズを 削除するように要求されるからです。
openssl rsa -in newreq.pem -out wwwkeyunsecure.pem |
/etc/httpd/conf/ssl/ssl.default-vhost.conf を編集します。
---- # Server Certificate: # サーバの証明書: # Point SSLCertificateFile at a PEM encoded certificate. If # the certificate is encrypted, then you will be prompted for a # pass phrase. Note that a kill -HUP will prompt again. A test # certificate can be generated with `make certificate' under # built time. # PEM エンコードされた証明書で SSLCertificateFile を示す。 # もし証明書が暗号化されていれば、パスフレーズを要求されます。 # kill -HUP は再び入力を促すことに注意。ビルド時に、 # 'make certificate' としてテスト証明書を生成可能です。 #SSLCertificateFile conf/ssl/ca.crt SSLCertificateFile wwwcert.crt # Server Private Key: # サーバの秘密鍵: # If the key is not combined with the certificate, use this # directive to point at the key file. # もしこの鍵が証明書と一緒になっていなければ、この指示で # 鍵ファイルを示す。 #SSLCertificateKeyFile conf/ssl/ca.key.unsecure SSLCertificateKeyFile wwwkeyunsecure.pem ---- |
このファイルを OpenSSL の /var/ssl ディレクトリに移し、 newreq.pem に名前を変更し、例によって要求に署名します。
CA.pl -sign |
openssl x509 -in newcert.pem -out newcertx509.pem |
テキストエディタを用いて -CERTIFICATE- セクション以外の部分を削除してしまうのも また適切な手段です。
これで newcertx509.pem ファイルは -CERTIFICATE- セクションだけを 含むことになりました。