diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-08-24 18:15:25 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-08-24 18:15:25 -0400 |
commit | d43ad788f295023f6e7d923fa07f0928a9a270d0 (patch) | |
tree | 4c8d54143bcab1e79440ee837b57ba0395549253 /usr/local/www | |
parent | af539291187b159b4c7ddab791536f59193c21ea (diff) | |
parent | 29dc1e6e81998c881c15c08c526d7de65ff8e76b (diff) | |
download | pfsense-d43ad788f295023f6e7d923fa07f0928a9a270d0.zip pfsense-d43ad788f295023f6e7d923fa07f0928a9a270d0.tar.gz |
Merge branch 'master' of git://rcs.pfsense.org/pfsense/nigel-ca-chain into review/master
Conflicts:
etc/inc/certs.inc
etc/inc/upgrade_config.inc
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/system_camanager.php | 25 | ||||
-rw-r--r-- | usr/local/www/system_certmanager.php | 11 |
2 files changed, 28 insertions, 8 deletions
diff --git a/usr/local/www/system_camanager.php b/usr/local/www/system_camanager.php index 758ccea..3458da5 100644 --- a/usr/local/www/system_camanager.php +++ b/usr/local/www/system_camanager.php @@ -389,6 +389,7 @@ function method_change() { <tr> <td width="20%" class="listhdrr">Name</td> <td width="10%" class="listhdrr">Internal</td> + <td width="10%" class="listhdrr">Issuer</td> <td width="10%" class="listhdrr">Certificates</td> <td width="40%" class="listhdrr">Distinguished Name</td> <td width="10%" class="list"></td> @@ -398,22 +399,35 @@ function method_change() { foreach($a_ca as $ca): $name = htmlspecialchars($ca['name']); $subj = cert_get_subject($ca['crt']); + $issuer = cert_get_issuer($ca['crt']); + if($subj == $issuer) + $issuer_name = "<em>self-signed</em>"; + else + $issuer_name = "<em>external</em>"; $subj = htmlspecialchars($subj); + $issuer = htmlspecialchars($issuer); $certcount = 0; + $issuer_ca = lookup_ca($ca['caref']); + if ($issuer_ca) + $issuer_name = $issuer_ca['name']; + // TODO : Need gray certificate icon if($ca['prv']) { $caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png"; $internal = "YES"; - foreach ($a_cert as $cert) - if ($cert['caref'] == $ca['refid']) - $certcount++; } else { $caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png"; $internal = "NO"; } + foreach ($a_cert as $cert) + if ($cert['caref'] == $ca['refid']) + $certcount++; + foreach ($a_ca as $cert) + if ($cert['caref'] == $ca['refid']) + $certcount++; ?> <tr> <td class="listlr"> @@ -429,6 +443,7 @@ function method_change() { </table> </td> <td class="listr"><?=$internal;?> </td> + <td class="listr"><?=$issuer_name;?> </td> <td class="listr"><?=$certcount;?> </td> <td class="listr"><?=$subj;?> </td> <td valign="middle" nowrap class="list"> @@ -445,7 +460,7 @@ function method_change() { endforeach; ?> <tr> - <td class="list" colspan="4"></td> + <td class="list" colspan="5"></td> <td class="list"> <a href="system_camanager.php?act=new"> <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add or import ca" alt="add ca" width="17" height="17" border="0" /> @@ -453,7 +468,7 @@ function method_change() { </td> </tr> <tr> - <td colspan="4"> + <td colspan="5"> <p> <?=gettext("Additional trusted certificate authorities can be added here.");?> </p> diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php index 4803187..be3f88b 100644 --- a/usr/local/www/system_certmanager.php +++ b/usr/local/www/system_certmanager.php @@ -694,7 +694,7 @@ function internalca_change() { <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" class="listhdrr">Name</td> - <td width="20%" class="listhdrr">CA</td> + <td width="20%" class="listhdrr">Issuer</td> <td width="40%" class="listhdrr">Distinguished Name</td> <td width="10%" class="list"></td> </tr> @@ -704,8 +704,13 @@ function internalca_change() { $name = htmlspecialchars($cert['name']); if ($cert['crt']) { - $subj = htmlspecialchars(cert_get_subject($cert['crt'])); - $caname = "<em>external</em>"; + $subj = cert_get_subject($cert['crt']); + $issuer = cert_get_issuer($cert['crt']); + if($subj==$issuer) + $caname = "<em>self-signed</em>"; + else + $caname = "<em>external</em>"; + $subj = htmlspecialchars($subj); } if ($cert['csr']) { |