--- loncom/configuration/SSL.pm 2016/07/25 19:50:16 1.1 +++ loncom/configuration/SSL.pm 2016/08/01 13:55:05 1.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Checksum installed LON-CAPA modules and some configuration files # -# $Id: SSL.pm,v 1.1 2016/07/25 19:50:16 raeburn Exp $ +# $Id: SSL.pm,v 1.2 2016/08/01 13:55:05 raeburn Exp $ # # The LearningOnline Network with CAPA # @@ -61,10 +61,10 @@ sub print_certstatus { my @files = qw(key host hostname ca); my @fields = qw(status cn start end alg size email); foreach my $server (sort(keys(%{$servers}))) { - my $hostname = &Apache::lonnet::hostname($server); my ($result,$hashref) = &Apache::lonnet::get_servercerts_info($server,$context); if ($result eq 'ok' && ref($hashref) eq 'HASH') { if ($target eq 'web') { + my $hostname = &Apache::lonnet::hostname($server); $message .= "
$hostname ($server)". &Apache::loncommon::start_data_table(). &Apache::loncommon::start_data_table_header_row()."\n"; @@ -99,6 +99,7 @@ sub print_certstatus { $message .= "$display,"; } } + } else { if ($target eq 'web') { $message .= ''.$lt{'no'}.''; @@ -111,13 +112,13 @@ sub print_certstatus { } else { $message .= ','; } - } - if ($target eq 'web') { - $message .= &Apache::loncommon::end_data_table_row()."\n"; - } else { - $message =~ s/,$//; - $message .= '&'; - } + } + } + if ($target eq 'web') { + $message .= &Apache::loncommon::end_data_table_row()."\n"; + } else { + $message =~ s/,$//; + $message .= '&'; } } if ($target eq 'web') {