diff options
author | jim-p <jimp@pfsense.org> | 2013-07-11 15:16:26 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-07-11 15:18:18 -0400 |
commit | fd4fc12087ab45fd66049dbb4a21e4a2d2075228 (patch) | |
tree | 63695029f200bcdc7cfa72fe1e7fd47c7d2400f2 /etc | |
parent | 469e33330d65b92f8c34ce2c4609c2e9b65b5af3 (diff) | |
download | pfsense-fd4fc12087ab45fd66049dbb4a21e4a2d2075228.zip pfsense-fd4fc12087ab45fd66049dbb4a21e4a2d2075228.tar.gz |
Move variable declaration to the top, declare it global before defining. Fixes #3090
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/certs.inc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc index 8640827..3525660 100644 --- a/etc/inc/certs.inc +++ b/etc/inc/certs.inc @@ -34,8 +34,21 @@ define("OPEN_SSL_CONF_PATH", "/etc/ssl/openssl.cnf"); require_once("functions.inc"); +global $openssl_digest_algs; $openssl_digest_algs = array("sha1", "sha224", "sha256", "sha384", "sha512"); +global $openssl_crl_status; +$openssl_crl_status = array( + OCSP_REVOKED_STATUS_NOSTATUS => "No Status (default)", + OCSP_REVOKED_STATUS_UNSPECIFIED => "Unspecified", + OCSP_REVOKED_STATUS_KEYCOMPROMISE => "Key Compromise", + OCSP_REVOKED_STATUS_CACOMPROMISE => "CA Compromise", + OCSP_REVOKED_STATUS_AFFILIATIONCHANGED => "Affiliation Changed", + OCSP_REVOKED_STATUS_SUPERSEDED => "Superseded", + OCSP_REVOKED_STATUS_CESSATIONOFOPERATION => "Cessation of Operation", + OCSP_REVOKED_STATUS_CERTIFICATEHOLD => "Certificate Hold" +); + function & lookup_ca($refid) { global $config; @@ -561,17 +574,6 @@ function cert_in_use($certref) { is_captiveportal_cert($certref)); } -$openssl_crl_status = array( - OCSP_REVOKED_STATUS_NOSTATUS => "No Status (default)", - OCSP_REVOKED_STATUS_UNSPECIFIED => "Unspecified", - OCSP_REVOKED_STATUS_KEYCOMPROMISE => "Key Compromise", - OCSP_REVOKED_STATUS_CACOMPROMISE => "CA Compromise", - OCSP_REVOKED_STATUS_AFFILIATIONCHANGED => "Affiliation Changed", - OCSP_REVOKED_STATUS_SUPERSEDED => "Superseded", - OCSP_REVOKED_STATUS_CESSATIONOFOPERATION => "Cessation of Operation", - OCSP_REVOKED_STATUS_CERTIFICATEHOLD => "Certificate Hold" -); - function crl_create(& $crl, $caref, $name, $serial=0, $lifetime=9999) { global $config; $ca =& lookup_ca($caref); |