以下省略!

タイダルウ(ry ほぼ毎日1記事執筆運動実施中。 ※記事に広告(アフィリエイト)リンクを掲載している場合があります。

Let's Encryptで証明書を失効させたメモ

https://rita.xyz/blog/irasutoya/key-w200-fs8-zf.pngrita.linkの完全閉鎖作業において、Let's Encryptで発行した証明書を失効させたが、そのときのメモ。まぁあっさりと終わりますがね。
certbot(snapによって自動更新されている)の場合、revokeのあとに--cert-name--cert-pathで失効させる証明書を指定する。
ACME認証は行わないので、予めnginx側で当該ドメインSSL設定を外しておいたほうが吉(恐らくpost-hookなどが動く→nginxが証明書を読み込めずエラーとなるため)。
自分の場合は--cert-nameでどのドメインの証明書を失効させるか指定した。

$ sudo certbot revoke --cert-name rita.link

失効処理後に証明書削除するか?と2度聞かれるのでyと答えておく。

Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you like to delete the certificate(s) you just revoked, along with all
earlier and later versions of the certificate?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es (recommended)/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificate(s) are selected for deletion:

  * rita.link

WARNING: Before continuing, ensure that the listed certificates are not being
used by any installed server software (e.g. Apache, nginx, mail servers).
Deleting a certificate that is still being used will cause the server software
to stop working. See https://certbot.org/deleting-certs for information on
deleting certificates safely.

Are you sure you want to delete the above certificate(s)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Deleted all files relating to certificate rita.link.
Congratulations! You have successfully revoked the certificate that was located at /etc/letsencrypt/live/rita.link/cert.pem.

これで失効処理され、証明書のファイルも削除される。