# SPDX-FileCopyrightText: 2023 Eduardo Sánchez Muñoz # # SPDX-License-Identifier: curl Disables checking current date in mk-ca-bundle script, so it produces reproducible bundles. diff -ru scripts/mk-ca-bundle.pl scripts/mk-ca-bundle.pl --- scripts/mk-ca-bundle.pl +++ scripts/mk-ca-bundle.pl @@ -499,19 +499,7 @@ if($main_block) { push @precert, $_ if not /^#$/; if(/^# Not Valid After : (.*)/) { - my $stamp = $1; - use Time::Piece; - # Not Valid After : Thu Sep 30 14:01:15 2021 - my $t = Time::Piece->strptime($stamp, "%a %b %d %H:%M:%S %Y"); - my $delta = ($t->epoch - time()); # negative means no longer valid - if($delta < 0) { - $skipnum++; - report "Skipping: $main_block_name is not valid anymore" if ($opt_v); - $valid = 0; - } - else { - $valid = 1; - } + $valid = 1; } } next; @@ -573,24 +561,6 @@ if($timestamp[12] ne "Z") { report "distrust date stamp is not using UTC"; } - # Example date: 200617000000Z - # Means 2020-06-17 00:00:00 UTC - my $distrustat = - timegm($timestamp[10] . $timestamp[11], # second - $timestamp[8] . $timestamp[9], # minute - $timestamp[6] . $timestamp[7], # hour - $timestamp[4] . $timestamp[5], # day - ($timestamp[2] . $timestamp[3]) - 1, # month - "20" . $timestamp[0] . $timestamp[1]); # year - if(time >= $distrustat) { - # not trusted anymore - $skipnum++; - report "Skipping: $main_block_name is not trusted anymore" if ($opt_v); - $valid = 0; - } - else { - # still trusted - } } next; }