- 追加された行はこの色です。
- 削除された行はこの色です。
SSL通信をするためのSSL証明書作成手順
$ openssl genrsa -des3 -out key.pem 1024
$ openssl rsa -in key.pem -out key.pem
$ openssl req -new -days 365 -key key.pem -out csr.pem
最後のコマンドラインを実行するといくつか質問されるので%%適当%%妥当な答えを入れておきます。自分だけで使うので適当に入れても問題がないということなのだと自分では思ってますが…
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:自分のホスト名
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
CA.sh は VineのインストールCDには入っていないので追加で入れる。 mod_ssl をいれる。apache に依存しているので強制的にインストール
CA.sh は VineのインストールCDには入っていないので追加で入れる。 mod_ssl をいれる。apache に依存しているので気をつけておく。
$ http://www.ring.gr.jp/pub/linux/Vine/Vine-3.2/i386/\
Vine/RPMS/mod_ssl-2.8.22-0vl2.i386.rpm
$ rpm -i --nodeps mod_ssl-2.8.22-0vl2.i386.rpm
$ rpm -i mod_ssl-2.8.22-0vl2.i386.rpm
CA.sh を使ってなんか必要なものを作る
$ cd /usr/local/apache2/ssl
$ ./CA.sh -newca
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:自分のホスト名
$ openssl ca -in /.../csr.pem -keyfile demoCA/private/cakey.pem -cert \
demoCA/cacert.pem -out /usr/local/apache2/cert.pem
# cd /usr/local/apahce2/ssl
# mkdir ssl.crt
# mv ../cert.pem server.crt
# mkdir ssl.key
# cp /.../key.pem ssl.key/
# mv server.crt ssl.crt/
# mv ssl.key/key.pem ssl.key/server.key
あとは httpd.conf を設定する。
-httpd.conf
SSLCertificateFile /usr/local/apache2/ssl/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache2/ssl/ssl.key/server.key