diff options
author | jim-p <jimp@pfsense.org> | 2010-10-19 14:19:44 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-10-19 14:19:44 -0400 |
commit | f2a86ca96fb8e49d978679dab4cfad6ce2f0d9f4 (patch) | |
tree | 5d64e957ba798bc7818f31a3dc7b1593de59a7f0 /etc/inc/certs.inc | |
parent | 6751b3e7863196ab865f8fb76a2ad6e9f8556788 (diff) | |
download | pfsense-f2a86ca96fb8e49d978679dab4cfad6ce2f0d9f4.zip pfsense-f2a86ca96fb8e49d978679dab4cfad6ce2f0d9f4.tar.gz |
Rename 'name' to 'descr' for CA, Certificates, and CRLs, to gain CDATA protection and standardize field names. Ticket #320.
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r-- | etc/inc/certs.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc index 0a9e342..ef55a3e 100644 --- a/etc/inc/certs.inc +++ b/etc/inc/certs.inc @@ -72,7 +72,7 @@ function & lookup_cert_by_name($name) { global $config; if (is_array($config['cert'])) foreach ($config['cert'] as & $cert) - if ($cert['name'] == $name) + if ($cert['descr'] == $name) return $cert; } @@ -453,7 +453,7 @@ function crl_create(& $crl, $caref, $name, $serial=0, $lifetime=9999) { $ca =& lookup_ca($caref); if (!$ca) return false; - $crl['name'] = $name; + $crl['descr'] = $name; $crl['caref'] = $caref; $crl['serial'] = $serial; $crl['lifetime'] = $lifetime; @@ -502,7 +502,7 @@ function cert_unrevoke($cert, & $crl) { if (!is_crl_internal($crl)) return false; foreach ($crl['cert'] as $id => $rcert) { - if (($rcert['refid'] == $cert['refid']) || ($rcert['name'] == $cert['name'])) { + if (($rcert['refid'] == $cert['refid']) || ($rcert['descr'] == $cert['descr'])) { unset($crl['cert'][$id]); crl_update($crl); return true; @@ -521,7 +521,7 @@ function is_cert_revoked($cert, $crlref = "") { if (!is_array($crl['cert'])) return false; foreach ($crl['cert'] as $rcert) { - if (($rcert['refid'] == $cert['refid']) || ($rcert['name'] == $cert['name'])) + if (($rcert['refid'] == $cert['refid']) || ($rcert['descr'] == $cert['descr'])) return true; } } else { @@ -529,7 +529,7 @@ function is_cert_revoked($cert, $crlref = "") { if (!is_array($crl['cert'])) continue; foreach ($crl['cert'] as $rcert) { - if (($rcert['refid'] == $cert['refid']) || ($rcert['name'] == $cert['name'])) + if (($rcert['refid'] == $cert['refid']) || ($rcert['descr'] == $cert['descr'])) return true; } } |