CentOS5.8のopensslは0.9系。いつかこの日が来ると思ってましたが昨日でした(笑)
# /usr/bin/openssl s_client -host example.com -port 443 Verify return code: 10 (certificate has expired)
ありゃ・・・
ブラウザから手元のMacからチェックしてみたらOK。
もしや・・・
openssl 1.0系
openssl x509 -in /etc/pki/tls/cert.pem -noout -dates
notBefore=Aug 17 22:00:00 2005 GMT notAfter=Aug 17 22:00:00 2015 GMT
openssl 0.9系
# openssl x509 -in /etc/pki/tls/cert.pem -noout -dates notBefore=Nov 9 00:00:00 1994 GMT notAfter=Jan 7 23:59:59 2010 GMT
古かった・・・
この証明書は2014年1月28日から使えなくなってるので、新しいのに更新する。
追記:正確に書くと、このca-bundleの中に入ってるGlobalSign用のCAが古いのでca-bundleごと更新するという事になります。このca-bundle.crtを使い続けていてもVeriSignなどとは今のところ普通に使えます。まあ古くなっているのは替えておいて方がいいです。
作業開始
cURL - Extract CA Certs from Mozilla
こちらから拝借
# cd /etc/pki/tls # wget http://curl.haxx.se/ca/cacert.pem # ll 合計 36 lrwxrwxrwx 1 root root 19 1月 29 10:31 cert.pem -> certs/ca-bundle.crt drwxr-xr-x 2 root root 4096 1月 29 11:13 certs drwxr-xr-x 2 root root 4096 1月 29 10:31 misc -rw-r--r-- 1 root root 9828 3月 5 2013 openssl.cnf drwxr-xr-x 2 root root 4096 3月 5 2013 private # mv certs/ca-bundle.crt certs/ca-bundle.crt.old # mv cacert.pem certs/ca-bundle.crt # /usr/bin/openssl s_client -host example.com -port 443 Verify return code: 0 (ok)
OKです。
ちなみにCentOS6にはopenssl1.0系が入っており、今日現在問題は発生しておらず。
非常に助かったので寄付しておいた
これからも応援しております。