目次一覧
状態:-
閲覧数:326
投稿日:2019-05-21
更新日:2019-05-21
前提 / 生じた疑問 / 試してみたけれどもうまくいかなかった内容
複数ホストを後から確認する方法 / 案1.ブラウザで確認 / 案2.「certbotが管理している証明書の情報を表示する」ことで確認
複数ホストを後から確認する方法 / 案1.ブラウザで確認 / 案2.「certbotが管理している証明書の情報を表示する」ことで確認
前提 / 生じた疑問 / 試してみたけれどもうまくいかなかった内容
前提
下記コマンドで、複数ホストを1つの証明書で取得
・ワイルドカードではない
$ sudo certbot --nginx
環境
・CentOS7
・Nginx
生じた疑問
後から各ホスト名を確認するにはどうすれば良いの?
試してみたけれどもうまくいかなかった内容
試したこと1.ブラウザで証明書の発行元を確認
・発行元は一つのホストだけしか掲載されていない
試したこと2.証明書を直接確認
・平文で保存されていないため、内容を読めない
$ sudo less /etc/letsencrypt/archive/b.example.com/fullchain1.pem
複数ホストを後から確認する方法 / 案1.ブラウザで確認 / 案2.「certbotが管理している証明書の情報を表示する」ことで確認
複数ホストを後から確認する方法
案1.ブラウザで確認
案2.certbotが管理している証明書の情報を表示することで確認
案1.ブラウザで確認
「サブジェクト代替名」
・SSL証明書の「サブジェクト代替名」をブラウザで確認する
手順
・ブラウザの鍵アイコンをクリック後、「証明書」をクリックする
・[詳細]-[サブジェクト代替名]をクリック
複数ホストを1つの証明書で取得している場合の表示例
DNS Name=a.example.com
DNS Name=b.example.com
1つのホストを1つの証明書で取得している場合の表示例
DNS Name=p.example.com
案2.「certbotが管理している証明書の情報を表示する」ことで確認
複数ホストを1つの証明書で取得している場合の表示例
・「a.example.com証明書」には、「c.example.org a.example.com b.example.com」が含まれている
$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: a.example.com
Domains: c.example.org a.example.com b.example.com
Expiry Date: 2019-05-17 19:05:46+00:00 (VALID: 35 days)
Certificate Path: /etc/letsencrypt/live/a.example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/a.example.com/privkey.pem
Certificate Name: entrepreneur.example.com
Domains: entrepreneur.example.com
Expiry Date: 2019-07-08 16:16:24+00:00 (VALID: 87 days)
Certificate Path: /etc/letsencrypt/live/entrepreneur.example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/entrepreneur.example.com/privkey.pem
Certificate Name: g.example.net
Domains: g.example.net
Expiry Date: 2019-05-02 00:27:49+00:00 (VALID: 19 days)
Certificate Path: /etc/letsencrypt/live/g.example.net/fullchain.pem
Private Key Path: /etc/letsencrypt/live/g.example.net/privkey.pem
Certificate Name: p.example.com
Domains: p.example.com
Expiry Date: 2019-07-01 19:40:02+00:00 (VALID: 80 days)
Certificate Path: /etc/letsencrypt/live/p.example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/p.example.com/privkey.pem
Certificate Name: example.com
Domains: *.example.com *.example.com *.example.net example.com example.net example.com
Expiry Date: 2019-05-01 22:55:56+00:00 (VALID: 19 days)
Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1つのホストを1つの証明書で取得している場合の表示例
$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: e.example.org
Domains: e.example.org
Expiry Date: 2019-07-08 16:16:24+00:00 (VALID: 48 days)
Certificate Path: /etc/letsencrypt/live/e.example.org/fullchain.pem
Private Key Path: /etc/letsencrypt/live/e.example.org/privkey.pem
Certificate Name: g.example.net
Domains: g.example.net
Expiry Date: 2019-07-18 14:51:13+00:00 (VALID: 58 days)
Certificate Path: /etc/letsencrypt/live/g.example.net/fullchain.pem
Private Key Path: /etc/letsencrypt/live/g.example.net/privkey.pem
Certificate Name: p.example.com
Domains: p.example.com
Expiry Date: 2019-07-01 19:40:02+00:00 (VALID: 41 days)
Certificate Path: /etc/letsencrypt/live/p.example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/p.example.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -