2011-05-05 23:00 | tag: centos, linux, apache
CentOSにcrypto-utilsをインストールすると、SSLサーバ証明書の有効期限切れが1ヶ月以内に迫ると毎日メールで通知を受けることができます。これにより、うっかり更新作業を忘れて有効期限が切れてしまうという事故を防ぐことができます。
crypto-utilをインストールするだけで設定完了です。
/etc/cron.daily/certwatchというスクリプトが作成され、Apacheで使用しているすべてのSSLサーバ証明書の有効期限のチェックが一日一回行われるようになります。
yum install crypto-utils
SSLサーバ証明書の有効期限まで1ヶ月を切ると、以下のようなメールが毎日root宛に送られてきます。
################# SSL Certificate Warning ################
Certificate for hostname 'www.example.com', in file:
/etc/pki/tls/certs/BXXXXXXX.cer
The certificate needs to be renewed; this can be done
using the 'genkey' program.
Browsers will not be able to correctly connect to this
web site using SSL until the certificate is renewed.
##########################################################
Generated by certwatch(1)