version 1.4, 2016/08/07 04:18:21
|
version 1.5, 2017/05/18 22:13:57
|
Line 61 sub print_certstatus {
|
Line 61 sub print_certstatus {
|
'ca' => 'LON-CAPA CA Certificate', |
'ca' => 'LON-CAPA CA Certificate', |
'expired' => 'Expired', |
'expired' => 'Expired', |
'future' => 'Future validity', |
'future' => 'Future validity', |
|
'nokey' => 'No key', |
|
'otherkey' => 'No matching key', |
); |
); |
my @files = qw(key host hostname ca); |
my @files = qw(key host hostname ca); |
my @fields = qw(status cn start end alg size email); |
my @fields = qw(status cn start end alg size email); |
Line 91 sub print_certstatus {
|
Line 93 sub print_certstatus {
|
if ($target eq 'web') { |
if ($target eq 'web') { |
$message .= '<td>'.$lt{'yes'}.'</td>'; |
$message .= '<td>'.$lt{'yes'}.'</td>'; |
} else { |
} else { |
$message .= $lt{'yes'}.','; |
$message .= 'yes,'; |
} |
} |
unless ($file eq 'key') { |
unless ($file eq 'key') { |
if ($hashref->{$file}->{'end'} ne '') { |
if ($hashref->{$file}->{'end'} ne '') { |
Line 99 sub print_certstatus {
|
Line 101 sub print_certstatus {
|
if (ref($dt)) { |
if (ref($dt)) { |
$endtime = $dt->epoch; |
$endtime = $dt->epoch; |
if ($endtime < time) { |
if ($endtime < time) { |
$dateinvalid = $lt{'expired'}; |
if ($target eq 'web') { |
|
$dateinvalid = $lt{'expired'}; |
|
} else { |
|
$dateinvalid = 'expired'; |
|
} |
} |
} |
} |
} |
} |
} |
Line 109 sub print_certstatus {
|
Line 115 sub print_certstatus {
|
$starttime = $dt->epoch; |
$starttime = $dt->epoch; |
if ($starttime > time) { |
if ($starttime > time) { |
unless ($dateinvalid) { |
unless ($dateinvalid) { |
$dateinvalid = $lt{'future'}; |
if ($target eq 'web') { |
|
$dateinvalid = $lt{'future'}; |
|
} else { |
|
$dateinvalid = 'future'; |
|
} |
} |
} |
} |
} |
} |
} |
Line 136 sub print_certstatus {
|
Line 146 sub print_certstatus {
|
} elsif ($target eq 'web') { |
} elsif ($target eq 'web') { |
$display = &Apache::lonhtmlcommon::confirm_success($display); |
$display = &Apache::lonhtmlcommon::confirm_success($display); |
} |
} |
|
} elsif (($display eq 'nokey') || ($display eq 'otherkey')) { |
|
if ($target eq 'web') { |
|
$display = $lt{$display}; |
|
} |
} |
} |
} elsif ($item eq 'start') { |
} elsif ($item eq 'start') { |
if ($starttime) { |
if ($starttime) { |
Line 164 sub print_certstatus {
|
Line 178 sub print_certstatus {
|
if ($target eq 'web') { |
if ($target eq 'web') { |
$message .= '<td>'.$lt{'no'}.'<td>'; |
$message .= '<td>'.$lt{'no'}.'<td>'; |
} else { |
} else { |
$message .= $lt{'no'}.','; |
$message .= 'no,'; |
} |
} |
foreach my $item (@fields) { |
foreach my $item (@fields) { |
if ($target eq 'web') { |
if ($target eq 'web') { |