0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

SSL証明書の有効期限を調べるコマンド

Posted at

プロジェクトのSSL証明書は/etc/letsencrypt/archiveに保存されています。

証明書を更新するたびに証明書が増えて、cert.pemcert2.pemcert3.pem…と増えていきます。
/etc/letsencrypt/live/example.com/には最新のものへのシンボリックリンクが保存される)
証明書の有効期限を知りたいことがありました。

その場合のコマンドをメモしておきます。
cert3.pemの有効期限を知りたい場合↓

[user@ip-172-8-0-10 example.com]$ cd /etc/letsencrypt/archive/example.com
[user@ip-172-8-0-10 example.com]$ openssl x509 -noout -subject -dates -in cert3.pem
subject= /CN=example.com
notBefore=Jan 14 17:32:01 2023 GMT
notAfter=Apr 14 17:32:00 2023 GMT

notBeforeが有効になった日時、notAfterが有効期限の日時。

参考:

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?