Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Be more insistent about "long" expired certificates in the hope that …
Browse files Browse the repository at this point in the history
…we can prioritise those.

"Long" defined arbitrarily for now at 180 days (about six months).
  • Loading branch information
iay committed Jul 31, 2012
1 parent 865827d commit 7ae469d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/check_embedded.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/perl -w
use POSIX qw(floor);
use File::Temp qw(tempfile);
use Date::Parse;
use Digest::SHA1 qw(sha1 sha1_hex sha1_base64);
Expand Down Expand Up @@ -204,7 +205,10 @@ sub comment {
if (/Not After : (.*)$/) {
$notAfter = $1;
$days = (str2time($notAfter)-time())/86400.0;
if ($days < 0) {
if ($days < -180) {
my $d = floor(-$days);
error("EXPIRED LONG AGO ($d days)");
} elsif ($days < 0) {
error("EXPIRED");
} elsif ($days < 18) {
$days = int($days);
Expand Down

0 comments on commit 7ae469d

Please sign in to comment.