Change x509 not_before/not_after to not be based on local timezone

Not the not_before/not_after fields output GMT based times.

Also adds a new btest diff canonifier which only removes the first
timestamp in a line.

Fixes GH-4521
This commit is contained in:
Johanna Amann 2025-06-04 12:55:14 +01:00
parent 19f2621f7b
commit e797e15d38
5 changed files with 16 additions and 5 deletions

View file

@ -151,7 +151,7 @@ double X509Common::GetTimeFromAsn1(const ASN1_TIME* atime, file_analysis::File*
lTime.tm_yday = 0;
lTime.tm_isdst = 0; // No DST adjustment requested
lResult = mktime(&lTime);
lResult = timegm(&lTime);
if ( lResult ) {
if ( lTime.tm_isdst != 0 )