Mark certificates that will expire in the next 7 days as "EXPIRING"
This commit is contained in:
parent
1f402a5055
commit
c823778cee
|
@ -2814,7 +2814,7 @@ sub about {
|
|||
$aboutdialog->set_program_name("TinyCA2");
|
||||
$aboutdialog->set_version($main->{'version'});
|
||||
$aboutdialog->set_comments("using OpenSSL version " . $main->{'OpenSSL'}->get_version());
|
||||
$aboutdialog->set_copyright("2002-2006 Stephan Martin\n 2020 Thomas Hooge");
|
||||
$aboutdialog->set_copyright("2002-2006 Stephan Martin\n 2020-2021 Thomas Hooge");
|
||||
$aboutdialog->set_license("GNU Public License (GPL)");
|
||||
$aboutdialog->set_website("https://www.hoogi.de/tinyca/");
|
||||
$aboutdialog->set_authors(
|
||||
|
|
|
@ -273,7 +273,13 @@ sub add_list {
|
|||
$column->set_cell_data_func ($renderer, sub {
|
||||
my ($column, $cell, $model, $iter) = @_;
|
||||
$text = $model->get($iter, 7);
|
||||
$color = $text eq _("VALID")?'green':'red';
|
||||
if ($text eq _("VALID")) {
|
||||
$color = 'green';
|
||||
} elsif ($text eq _("EXPIRING")) {
|
||||
$color = 'orange';
|
||||
} else {
|
||||
$color = 'red';
|
||||
}
|
||||
$cell->set (text => $text, foreground => $color);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -775,6 +775,9 @@ sub parsecert {
|
|||
if($crl->{'ISSUER'} eq $tmp->{'ISSUER'}) {
|
||||
_set_expired($tmp->{'SERIAL'}, $indexfile);
|
||||
}
|
||||
} elsif ($tmp->{'EXPDATE'} - $time < 608400) {
|
||||
# cert expires in less than 7 days
|
||||
$tmp->{'STATUS'} = _("EXPIRING");
|
||||
}
|
||||
|
||||
if (defined($tmp->{'SERIAL'})) {
|
||||
|
|
Loading…
Reference in New Issue