YANO's digital garage

Copyright ©YANO All rights reserved. https://www.bravotouring.com/~yano/

Last-modified: 2024-04-17 (水)


[一語一絵/IT系]

SSLサーバ証明書の更新 / 2009-03-12 (木)

あと29日でサーバ証明書の期限が切れるというメールが来たので、サーバ証明書を更新

通常はserver.key(秘密鍵)からserver.csr(証明書申請情報)を生成してCAに送り、server.crt(デジタル証明書)を発行して貰って、サーバ上に配置するのだが、自分自身がなんちゃってCAになるのでcsrを端折って、keyから直接crtを作成する。

[root@nx9030 root]# cd /etc/httpd/conf/
[root@nx9030 conf]# /usr/bin/openssl req -new -key /etc/httpd/conf/ssl.key/server.key -x509 -days 400 -out /etc/httpd/conf/ssl.crt/server.crt
Enter pass phrase for /etc/httpd/conf/ssl.key/server.key:************(パスフレーズ)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP
State or Province Name (full name) [Berkshire]:Fukuoka
Locality Name (eg, city) [Newbury]:Fukuoka
Organization Name (eg, company) [My Company Ltd]:bravotouring.com
Organizational Unit Name (eg, section) []:authorization
Common Name (eg, your name or your server's hostname) []:www.bravotouring.com
Email Address []:webmaster@bravotouring.com
[root@nx9030 conf]# ### 終了 ###

ちなみに、今回のサーバ証明書の有効期間は400日にしといたよ。