--- loncom/configuration/SSL.pm 2016/08/07 04:18:21 1.4
+++ loncom/configuration/SSL.pm 2017/05/26 03:43:43 1.6
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Checksum installed LON-CAPA modules and some configuration files
#
-# $Id: SSL.pm,v 1.4 2016/08/07 04:18:21 raeburn Exp $
+# $Id: SSL.pm,v 1.6 2017/05/26 03:43:43 raeburn Exp $
#
# The LearningOnline Network with CAPA
#
@@ -61,6 +61,8 @@ sub print_certstatus {
'ca' => 'LON-CAPA CA Certificate',
'expired' => 'Expired',
'future' => 'Future validity',
+ 'nokey' => 'No key',
+ 'otherkey' => 'No matching key',
);
my @files = qw(key host hostname ca);
my @fields = qw(status cn start end alg size email);
@@ -91,7 +93,7 @@ sub print_certstatus {
if ($target eq 'web') {
$message .= '
'.$lt{'yes'}.' | ';
} else {
- $message .= $lt{'yes'}.',';
+ $message .= 'yes,';
}
unless ($file eq 'key') {
if ($hashref->{$file}->{'end'} ne '') {
@@ -99,7 +101,11 @@ sub print_certstatus {
if (ref($dt)) {
$endtime = $dt->epoch;
if ($endtime < time) {
- $dateinvalid = $lt{'expired'};
+ if ($target eq 'web') {
+ $dateinvalid = $lt{'expired'};
+ } else {
+ $dateinvalid = 'expired';
+ }
}
}
}
@@ -109,7 +115,11 @@ sub print_certstatus {
$starttime = $dt->epoch;
if ($starttime > time) {
unless ($dateinvalid) {
- $dateinvalid = $lt{'future'};
+ if ($target eq 'web') {
+ $dateinvalid = $lt{'future'};
+ } else {
+ $dateinvalid = 'future';
+ }
}
}
}
@@ -136,6 +146,10 @@ sub print_certstatus {
} elsif ($target eq 'web') {
$display = &Apache::lonhtmlcommon::confirm_success($display);
}
+ } elsif (($display eq 'nokey') || ($display eq 'otherkey')) {
+ if ($target eq 'web') {
+ $display = $lt{$display};
+ }
}
} elsif ($item eq 'start') {
if ($starttime) {
@@ -162,9 +176,9 @@ sub print_certstatus {
}
} else {
if ($target eq 'web') {
- $message .= ''.$lt{'no'}.' | ';
+ $message .= ' | '.$lt{'no'}.' | ';
} else {
- $message .= $lt{'no'}.',';
+ $message .= 'no,';
}
foreach my $item (@fields) {
if ($target eq 'web') {