Subject: | Crypt::LE bug when using web connection to check certificate expiration |
Date: | Fri, 20 Jan 2017 17:50:06 +0000 |
To: | "bug-Crypt-LE [...] rt.cpan.org" <bug-Crypt-LE [...] rt.cpan.org>, "leader [...] cpan.org" <leader [...] cpan.org> |
From: | Ariel Grin <arielgrin [...] outlook.com> |
Dear Alexander: I have installed your module Crypt::LE and I've managed to authorize my domain and generate my certificate.
I think I found a bug on the way the module checks for certificate expiration when using a web connection instead of the local saved certificate.
It seems as if the web connection check is retrieving one of the Let's Encrypt certificates, either the Root CA or the Intermediate Certificate. After running the renew command today, January 20th 2017, the remaining days before expiration are 1713, which corresponds to September 29th, 2021 and that is the "Not After" date of both Let's Encrypt certificates.
If the renew command uses the local certificate, which was issued yesterday, the remaining days before expiration are 89, which is the correct value for my certificate.
I see that there are 2 values at the start of the script, PEER_CRT and CRT_DEPTH that might have something to do with that, as currently the CRT_DEPTH is 3 and PEER_CRT is 1, at least that is what I can see from OpenSSL output when using s_client -showcerts -connect, OpenSSL retrieves 3 certificates and the last one showed is mine, but the script assigns PEER_CRT=4 and CRT_DEPTH=5
OS: Windows 2003 Server SP1
Perl: ActiveState Perl 5.12.4
Crypt::LE: 0.19
Thanks, Ariel.