diff options
author | ivan <ivan> | 2010-11-08 07:35:59 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-11-08 07:35:59 +0000 |
commit | 0c084bd209251525e6441cb2b56c46f4ff788a5f (patch) | |
tree | 466e71c1a2c6762249c94f1ab3fcf37d1dd1dc4e /httemplate/view | |
parent | 246e76618447bb7ac436e9bfb8c0b042f9613326 (diff) |
certificates ala communigate, RT#7515
Diffstat (limited to 'httemplate/view')
-rw-r--r-- | httemplate/view/svc_cert.cgi | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/httemplate/view/svc_cert.cgi b/httemplate/view/svc_cert.cgi index 48494d2d2..0cd66b422 100644 --- a/httemplate/view/svc_cert.cgi +++ b/httemplate/view/svc_cert.cgi @@ -33,9 +33,31 @@ my @fields = ( { 'field'=>'csr', 'value'=> sub { my $svc_cert = shift; - if ( $svc_cert->csr ) { #display the subject etc? - '<PRE><FONT STYLE="font-family:monospace">'. "\n". $svc_cert->csr. - '</FONT></PRE>'; + if ( $svc_cert->csr ) { + + my $out = ''; + + my %hash = $svc_cert->check_csr; + + $out .= include('/elements/table-grid.html'). #'<TABLE>'. + '<TR><TH COLSPAN=2 BGCOLOR="#cccccc" ALIGN="center">'. + 'Requested by</TH></TR>'; + + my $col = $svc_cert->subj_col; + + foreach my $key (keys %hash) { + $out .= "<TR><TD>". $labels{$col->{$key}}. "</TD>". + "<TD>". $hash{$key}. "</TD></TR>"; + } + + $out .= '</TABLE>'; + + $out .= + '<PRE><FONT STYLE="font-family:monospace">'. $svc_cert->csr. + '</FONT></PRE>'; + + $out; + } elsif ( $svc_cert->common_name ) { my $svcnum = $svc_cert->svcnum; qq(<A HREF="${p}misc/svc_cert-generate.html?action=generate_csr;svcnum=$svcnum">Generate</A>); |