Closed miiichael closed 3 years ago
michael@joyola:~/dl$ perl test.pl
github.com expires Wed Mar 30 15:59:59 2022 UTC (@1648655999)
michael@joyola:~/dl$ TZ=UTC perl test.pl
github.com expires Wed Mar 30 23:59:59 2022 UTC (@1648684799)
michael@joyola:~/dl$ TZ=AWST perl test.pl
github.com expires Wed Mar 30 23:59:59 2022 UTC (@1648684799)
michael@joyola:~/dl$ TZ=anything perl test.pl
github.com expires Wed Mar 30 23:59:59 2022 UTC (@1648684799)
michael@joyola:~/dl$ echo $TZ
michael@joyola:~/dl$
🤔
I cannot reproduce your problem. What version of Perl and Net::SSLeay are you using?
Even with $TZ unset (and not just set to an empty value)?
michael@joyola:~/dl$ perl test.pl
github.com expires Wed Mar 30 15:59:59 2022 UTC (@1648655999)
michael@joyola:~/dl$ TZ= perl test.pl
github.com expires Wed Mar 30 23:59:59 2022 UTC (@1648684799)
michael@joyola:~/dl$ dpkg -l perl libnet-ssleay-perl libio-socket-ssl-perl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================-============-============-=================================================================
ii libio-socket-ssl-perl 2.069-1 all Perl module implementing object oriented interface to SSL sockets
ii libnet-ssleay-perl 1.88-3+b1 amd64 Perl module for Secure Sockets Layer (SSL)
ii perl 5.32.1-3 amd64 Larry Wall's Practical Extraction and Report Language
I originally saw this on another machine (but am reporting from a machine with newer versions of most things).
michael@cnspc18:~/dev$ perl test.pl
github.com expires Wed Mar 30 15:59:59 2022 UTC (@1648655999)
michael@cnspc18:~/dev$ TZ= perl test.pl
github.com expires Wed Mar 30 23:59:59 2022 UTC (@1648684799)
michael@cnspc18:~/dev$ dpkg -l perl libnet-ssleay-perl libio-socket-ssl-perl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================-================-============-=================================================================
ii libio-socket-ssl-perl 2.060-3 all Perl module implementing object oriented interface to SSL sockets
ii libnet-ssleay-perl 1.85-2+b1 amd64 Perl module for Secure Sockets Layer (SSL)
ii perl 5.28.1-6+deb10u1 amd64 Larry Wall's Practical Extraction and Report Language
Okay, I now think this is a Net::SSLeay bug, specifically somewhere inside ASN1_TIME_timet().
*writes test case, prepares to write bug report*
Oh, someone already beat me to it...nearly two years ago: radiator-software/p5-net-ssleay#148.
Oh, one of the comments in the linked ticket suggests switching from ASN1_TIME_timet() to ASN1_TIME_timet_gm(). Is this feasible?
Oh, one of the comments in the linked ticket suggests switching from ASN1_TIME_timet() to ASN1_TIME_timet_gm(). Is this feasible?
This comment is about creating such a function so that the user can use it. There is no such function yet. Creating it will face the same problems as fixing ASN1_TIME_timet: there is no standardized function which can be used for this, i.e. neither libc has something (only some libc implementations) and neither all relevant OpenSSL and LibreSSL versions have it :(
This will be fixed once https://github.com/radiator-software/p5-net-ssleay/issues/148 is fixed. A proposed fix is made available in https://github.com/radiator-software/p5-net-ssleay/pull/284
test.pl:
Output of
perl test.pl
:Output of
openssl s_client -connect github.com:443 2>&1 </dev/null |openssl x509 -noout -text|grep After