Commit 1ce3d94c authored by Franco Fichtner's avatar Franco Fichtner

inc: apply random style fixes

(cherry picked from commit d01b7296)
parent 739ce7e9
......@@ -42,7 +42,8 @@ $openssl_crl_status = array(
OCSP_REVOKED_STATUS_CERTIFICATEHOLD => "Certificate Hold"
);
function & lookup_ca($refid) {
function &lookup_ca($refid)
{
global $config;
$false = false;
......@@ -53,10 +54,12 @@ function & lookup_ca($refid) {
}
}
}
return $false;
}
function & lookup_ca_by_subject($subject) {
function &lookup_ca_by_subject($subject)
{
global $config;
$false = false;
......@@ -68,10 +71,12 @@ function & lookup_ca_by_subject($subject) {
}
}
}
return $false;
}
function & lookup_cert($refid) {
function &lookup_cert($refid)
{
global $config;
$false = false;
......@@ -86,9 +91,11 @@ function & lookup_cert($refid) {
return $false;
}
function & lookup_crl($refid) {
function &lookup_crl($refid)
{
global $config;
$false = false;
if (is_array($config['crl'])) {
foreach ($config['crl'] as & $crl) {
if ($crl['refid'] == $refid) {
......@@ -96,10 +103,12 @@ function & lookup_crl($refid) {
}
}
}
return $false;
}
function ca_chain_array(& $cert) {
function ca_chain_array(&$cert)
{
if($cert['caref']) {
$chain = array();
$crt = lookup_ca($cert['caref']);
......@@ -277,8 +286,6 @@ function cert_create(&$cert, $caref, $keylen, $lifetime, $dn, $digest_alg = 'sha
return true;
}
function csr_get_subject($str_crt, $decode = true)
{
if ($decode) {
......@@ -378,7 +385,7 @@ function cert_get_issuer($str_crt, $decode = true)
}
return $issuer;
}
}
/* this function works on x509 (crt), rsa key (prv), and req(csr) */
function cert_get_modulus($str_crt, $decode = true, $type = 'crt')
......
......@@ -76,7 +76,7 @@ function alias_make_table($config)
}
}
}
}
}
/**
* parse config into array and return
......@@ -300,7 +300,6 @@ function set_device_perms() {
}
}
function make_config_revision_entry($desc = '')
{
global $config;
......
......@@ -336,5 +336,3 @@ function handle_ajax($nentries, $tail = 50)
exit;
}
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment