summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-10-21 16:00:15 -0400
committerjim-p <jimp@pfsense.org>2010-10-21 16:00:15 -0400
commit6a0b3ea4bfd00587ead0e1e7ccbbc12fba3781cb (patch)
treeb55e54d7495625746cb60363dee0a67393edce19
parent150bbe09fbc0d32dd3777ea44dcafb3d5eaa3bc4 (diff)
downloadpfsense-6a0b3ea4bfd00587ead0e1e7ccbbc12fba3781cb.zip
pfsense-6a0b3ea4bfd00587ead0e1e7ccbbc12fba3781cb.tar.gz
Indicate in various places if a certificate is revoked.
-rw-r--r--usr/local/www/system_certmanager.php5
-rw-r--r--usr/local/www/vpn_openvpn_client.php14
-rw-r--r--usr/local/www/vpn_openvpn_server.php14
3 files changed, 29 insertions, 4 deletions
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index a675508..a3395c9 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -705,6 +705,7 @@ function internalca_change() {
$selected = "";
$caname = "";
$inuse = "";
+ $revoked = "";
if (in_array($cert['refid'], $config['system']['user'][$userid]['cert']))
continue;
$ca = lookup_ca($cert['caref']);
@@ -714,8 +715,10 @@ function internalca_change() {
$selected = "selected";
if (cert_in_use($cert['refid']))
$inuse = " *In Use";
+ if (is_cert_revoked($cert))
+ $revoked = " *Revoked";
?>
- <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'] . $caname . $inuse;?></option>
+ <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'] . $caname . $inuse . $revoked;?></option>
<?php endforeach; ?>
</select>
</td>
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index f0db930..3678138 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -627,10 +627,22 @@ function autotls_change() {
<?php
foreach ($config['cert'] as $cert):
$selected = "";
+ $caname = "";
+ $inuse = "";
+ $revoked = "";
+ if (in_array($cert['refid'], $config['system']['user'][$userid]['cert']))
+ continue;
+ $ca = lookup_ca($cert['caref']);
+ if ($ca)
+ $caname = " (CA: {$ca['descr']})";
if ($pconfig['certref'] == $cert['refid'])
$selected = "selected";
+ if (cert_in_use($cert['refid']))
+ $inuse = " *In Use";
+ if (is_cert_revoked($cert))
+ $revoked = " *Revoked";
?>
- <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'];?></option>
+ <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'] . $caname . $inuse . $revoked;?></option>
<?php endforeach; ?>
</select>
</td>
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index c6e4825..7b85514 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -751,12 +751,22 @@ function netbios_change() {
<?php
foreach ($config['cert'] as $cert):
$selected = "";
- if (strstr($cert['descr'], "webConfigurator"))
+ $caname = "";
+ $inuse = "";
+ $revoked = "";
+ if (in_array($cert['refid'], $config['system']['user'][$userid]['cert']))
continue;
+ $ca = lookup_ca($cert['caref']);
+ if ($ca)
+ $caname = " (CA: {$ca['descr']})";
if ($pconfig['certref'] == $cert['refid'])
$selected = "selected";
+ if (cert_in_use($cert['refid']))
+ $inuse = " *In Use";
+ if (is_cert_revoked($cert))
+ $revoked = " *Revoked";
?>
- <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'];?></option>
+ <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'] . $caname . $inuse . $revoked;?></option>
<?php endforeach; ?>
</select>
</td>
OpenPOWER on IntegriCloud