2
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 3 years have passed since last update.

openssl verifyでunable to get local issuer certificateになる

Posted at

openssl verifyでunable to get local issuer certificateになる

openssl verify -show_chain -verbose /etc/letsencrypt/live/test.example.com/fullchain.pem
CN = test.example.com
error 20 at 0 depth lookup: unable to get local issuer certificate
error /etc/letsencrypt/live/test.example.com/fullchain.pem: verification failed

これは、openssl verifyが、中間証明書がチェーンされた証明書を想定していないことによるもの。
中間証明書のLet's Encrypt Authority X3-untrusted指定で教えてあげると良い。

openssl verify -show_chain -verbose -untrusted /etc/letsencrypt/live/test.example.com/fullchain.pem /etc/letsencrypt/live/test.example.com/fullchain.pem
/etc/letsencrypt/live/test.example.com/fullchain.pem: OK
Chain:
depth=0: CN = test.example.com (untrusted)
depth=1: C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3 (untrusted)
depth=2: O = Digital Signature Trust Co., CN = DST Root CA X3

-untrustedで指定する証明書は、中間証明書だけにして、 /etc/letsencrypt/live/test.example.com/chain.pem でも良い。

参考

2
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
2
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?