LoginSignup
0
0

More than 3 years have passed since last update.

GoDaddyの中間証明書をインストールする(wmo.int用)

Posted at

SSL証明書の話ってなんか検索が難しいんですよね。GoDaddyとやらの宣伝したいわけじゃないんですけどメモ。

動機

wget とか w3m で https://www.wmo.int/ にアクセスすると、
ERROR: cannot verify www.wmo.int's certificate, issued by 'CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\\, Inc.,L=Scottsdale,ST=Arizona,C=US'
みたいなことを言って死にます。見ての通り証明書を発行した中間証明書が信頼されていないので進めなくなったわけですね。

GoDaddy とやらのルートCA証明書は Firefox だとか ubuntu の ca-certificates パッケージにも入っているので、まあ信用していけないものではないでしょう。ただその次の段階の中間証明書が俺の /etc/ssl/certs に入っていないから wget が死ぬだけの話。

技術的には、サイト管理者に言って中間証明書とサイト証明書をひっつけて apache から送るようにしてもらうのが一つの方法ですが、まあちょっとサイトの性質上意味がある会話ができるまでの時間がどれだけになるやらわかりません。

証明書の入手と検証

CNでぐぐると証明書置き場 https://ssl-ccp.godaddy.com/repository?origin=CALLISTO がでてきます。CN と違う名前でリンクが貼ってあるので困りますが、まあヤマカンで https://ssl-ccp.godaddy.com/repository/gdig2.crt.pem を落としてみると CN があっています。

$ wget https://ssl-ccp.godaddy.com/repository/gdig2.crt.pem
$ openssl x509 -text < gdig2.crt.pem | grep CN
        Issuer: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root Certi
ficate Authority - G2
        Subject: C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., OU=http://certs.godad
dy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2

名前だけじゃなくて手持ちルートCA証明書にも合っています。CRL とかチェックするのはどうしたもんかと思うが、まあ最低限全くの偽物をつかまされているわけではない。

$ openssl veritfy < gdig2.crt.pem
stdin: OK

証明書のインストール(ubuntu)

RedHat 系なら /etc/pki でしたっけ。忘れました。

$ sudo cp gdig2.crt.pem /etc/ssl/certs/Go_Daddy_Secure_Certificate_Authrity_-_G2.pem
$ openssl x509 -hash -noout < gdig2.crt.pem
27eb7704
$ sudo ln -s /etc/ssl/certs/Go_Daddy_Secure_Certificate_Authrity_-_G2.pem /etc/ssl/certs/27eb7704.0

まあこれで wget が動くようになったのでよし。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0