X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_cert.cgi;h=48494d2d20ecf6d3e637de3843b91b4ae838e389;hp=28a269bcce2baee057eac16dc0c1132c93b10715;hb=e50b6ec8d63afe4c04ae33384758d8786fcc7cfe;hpb=874ad675da1321638b374d0b574231d7fa577196
diff --git a/httemplate/view/svc_cert.cgi b/httemplate/view/svc_cert.cgi
index 28a269bcc..48494d2d2 100644
--- a/httemplate/view/svc_cert.cgi
+++ b/httemplate/view/svc_cert.cgi
@@ -83,8 +83,9 @@ my @fields = (
"
$hash{notBefore} - $hash{notAfter} | ".
'';
+ my $svcnum = $svc_cert->svcnum;
+
if ( $hash{'selfsigned'} ) {
- my $svcnum = $svc_cert->svcnum;
$out .= qq(
Re-generate self-signed).
' '.
include('/elements/popup_link.html', {
@@ -113,6 +114,70 @@ my @fields = (
}
},
},
+ { 'field'=>'cacert',
+ 'value'=> sub {
+ my $svc_cert = shift;
+ if ( $svc_cert->cacert ) {
+
+ my %hash = $svc_cert->check_cacert;
+
+ tie my %w, 'Tie::IxHash',
+ 'subject' => 'Issued to',
+ 'issuer' => 'Issued by',
+ ;
+
+ my $out = '';
+
+ foreach my $w ( keys %w ) {
+
+ $out .= include('/elements/table-grid.html'). #''.
+ ''.
+ $w{$w}. ' | ';
+
+ my $col = $svc_cert->subj_col;
+
+ my $subj = $hash{$w};
+ foreach my $key (keys %$col) { #( keys %$subj ) {
+ $out .= "". $labels{$col->{$key}}. " | ".
+ "". $subj->{$key}. " | ";
+ }
+
+ $out .= ' | ';
+ }
+ $out .= ' |
';
+
+ $out .= ''.
+ 'Serial number | '.
+ "$hash{serial} |
".
+ 'Valid | '.
+ "$hash{notBefore} - $hash{notAfter} |
".
+ '
';
+
+ $out .= ''.
+ $svc_cert->certificate.
+ '';
+
+ $out;
+
+ } else {
+
+ my $svcnum = $svc_cert->svcnum;
+
+ include('/elements/popup_link.html', {
+ 'action' => $p."edit/svc_cert/import_cacert.html".
+ "?svcnum=$svcnum",
+ 'label' => 'Import certificate authority chain',#link
+ 'actionlabel' => 'Import certificate authority chain',#title
+ #opt
+ 'width' => '544',
+ 'height' => '368',
+ #'color' => '#ff0000',
+ }). ' (optional)'.
+ '
';
+
+ }
+ },
+ },
);
%init>