1 <% include('elements/svc_Common.html',
4 #'html_foot' => $html_foot,
10 my $fields = FS::svc_cert->table_info->{'fields'};
11 my %labels = map { $_ => ( ref($fields->{$_})
12 ? $fields->{$_}{'label'}
19 { field=>'privatekey',
22 if ( $svc_cert->privatekey && $svc_cert->check_privatekey ) {
23 '<FONT COLOR="#33ff33">Verification OK</FONT>';
24 } elsif ( $svc_cert->privatekey ) {
25 '<FONT COLOR="#ff0000">Verification error</FONT>';
31 qw( common_name organization organization_unit city state country cert_contact
36 if ( $svc_cert->csr ) { #display the subject etc?
37 '<FONT STYLE="font-family:monospace"><PRE>'. $svc_cert->csr.
39 } elsif ( $svc_cert->common_name ) {
40 my $svcnum = $svc_cert->svcnum;
41 qq(<A HREF="${p}misc/svc_cert-generate.html?action=generate_csr;svcnum=$svcnum">Generate</A>);
47 { 'field'=>'certificate',
50 if ( $svc_cert->certificate ) {
52 my %hash = $svc_cert->check_certificate;
53 my $out = '<TABLE>'; #XXX better formatting
54 foreach my $key ( keys %hash ) {
55 $out .= "<TR><TD>$key</TD><TD>$hash{$key}</TD></TR>";
59 $out .= '<FONT STYLE="font-family:monospace"><PRE>'.
60 $svc_cert->certificate.
63 } elsif ( $svc_cert->csr ) {
64 my $svcnum = $svc_cert->svcnum;
65 qq(<A HREF="${p}misc/svc_cert-generate.html?action=generate_selfsigned;svcnum=$svcnum">Generate self-signed</A>);