summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl26
1 files changed, 21 insertions, 5 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl
index b9c7ed2579..e5a7420c0e 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl
+++ b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/Mozilla/mk-ca-bundle.pl
@@ -6,11 +6,11 @@
# * | (__| |_| | _ <| |___
# * \___|\___/|_| \_\_____|
# *
-# * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
# *
# * This software is licensed as described in the file COPYING, which
# * you should have received as part of this distribution. The terms
-# * are also available at https://curl.haxx.se/docs/copyright.html.
+# * are also available at https://curl.se/docs/copyright.html.
# *
# * You may opt to use, copy, modify, merge, publish, distribute and/or sell
# * copies of the Software, and permit persons to whom the Software is
@@ -436,9 +436,25 @@ while (<TXT>) {
last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
}
}
- elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) {
+# Not Valid After : Thu Sep 30 14:01:15 2021
+ elsif(/^# Not Valid After : (.*)/) {
+ my $stamp = $1;
+ use Time::Piece;
+ 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: $caname is not valid anymore" if ($opt_v);
+ $valid = 0;
+ }
+ else {
+ $valid = 1;
+ }
+ next;
+ }
+ elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) {
push @precert, $_;
- $valid = 1;
next;
}
elsif(/^#|^\s*$/) {
@@ -545,7 +561,7 @@ while (<TXT>) {
print CRT @precert if($opt_m);
my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK | Encode::LEAVE_SRC));
if ($opt_t) {
- foreach my $key (keys %trust_purposes_by_level) {
+ foreach my $key (sort keys %trust_purposes_by_level) {
my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}});
$maxStringLength = List::Util::max( length($string), $maxStringLength );
print CRT $string . "\n";