[freeside-commits] freeside/httemplate/view svc_cert.cgi, 1.1.2.4, 1.1.2.5
Ivan,,,
ivan at wavetail.420.am
Sun Nov 7 16:02:01 PST 2010
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv3508/httemplate/view
Modified Files:
Tag: FREESIDE_2_1_BRANCH
svc_cert.cgi
Log Message:
certificates ala communigate, RT#7515
Index: svc_cert.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_cert.cgi,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -w -d -r1.1.2.4 -r1.1.2.5
--- svc_cert.cgi 7 Nov 2010 23:47:04 -0000 1.1.2.4
+++ svc_cert.cgi 8 Nov 2010 00:01:59 -0000 1.1.2.5
@@ -83,8 +83,9 @@
"<TD>$hash{notBefore} - $hash{notAfter}</TD></TR>".
'</TABLE>';
- if ( $hash{'selfsigned'} ) {
my $svcnum = $svc_cert->svcnum;
+
+ if ( $hash{'selfsigned'} ) {
$out .= qq(<BR> <A HREF="${p}misc/svc_cert-generate.html?action=generate_selfsigned;svcnum=$svcnum">Re-generate self-signed</A>).
' '.
include('/elements/popup_link.html', {
@@ -113,6 +114,70 @@
}
},
},
+ { '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 = '<TABLE><TR><TD>';
+
+ foreach my $w ( keys %w ) {
+
+ $out .= include('/elements/table-grid.html'). #'<TABLE>'.
+ '<TR><TH COLSPAN=2 BGCOLOR="#cccccc" ALIGN="center">'.
+ $w{$w}. '</TH></TR>';
+
+ my $col = $svc_cert->subj_col;
+
+ my $subj = $hash{$w};
+ foreach my $key (keys %$col) { #( keys %$subj ) {
+ $out .= "<TR><TD>". $labels{$col->{$key}}. "</TD>".
+ "<TD>". $subj->{$key}. "</TD></TR>";
+ }
+
+ $out .= '</TABLE></TD><TD>';
+ }
+ $out .= '</TD></TR></TABLE>';
+
+ $out .= '<TABLE>'.
+ '<TR><TH ALIGN="right">Serial number</TH>'.
+ "<TD>$hash{serial}</TD></TR>".
+ '<TR><TH ALIGN="right">Valid</TH>'.
+ "<TD>$hash{notBefore} - $hash{notAfter}</TD></TR>".
+ '</TABLE>';
+
+ $out .= '<PRE><FONT STYLE="font-family:monospace">'.
+ $svc_cert->certificate.
+ '</FONT><PRE>';
+
+ $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)'.
+ '<BR>';
+
+ }
+ },
+ },
);
</%init>
More information about the freeside-commits
mailing list