Skip to content

Commit

Permalink
security/acme-client: style sweep
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jul 15, 2019
1 parent 91896a3 commit f082183
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function cert_action_validator($opt_cert_id)
}
// Allow only "revoke", "remove" and "removekey" for disabled certs.
if (!in_array($options["a"], ['remove','removekey','revoke'])) {
return(1); // Cert is disabled, skip it.
return(1); // Cert is disabled, skip it.
}
}

Expand Down Expand Up @@ -729,11 +729,11 @@ function run_acme_validation($certObj, $valObj, $acctObj)
$proc_env['CLOUDSDK_ACTIVE_CONFIG_NAME'] = $gcloud_config;
$proc_env['CLOUDSDK_CORE_PROJECT'] = $gcloud_project;
# Ensure that a working gcloud config exists.
run_shell_command("/usr/local/bin/gcloud config configurations create ${gcloud_config}",$proc_env);
run_shell_command("/usr/local/bin/gcloud config configurations activate ${gcloud_config}",$proc_env);
run_shell_command("/usr/local/bin/gcloud auth activate-service-account --key-file=${gcloud_key_file}",$proc_env);
run_shell_command("/usr/local/bin/gcloud config set account ${gcloud_account}",$proc_env);
run_shell_command("/usr/local/bin/gcloud config set project ${gcloud_project}",$proc_env);
run_shell_command("/usr/local/bin/gcloud config configurations create ${gcloud_config}", $proc_env);
run_shell_command("/usr/local/bin/gcloud config configurations activate ${gcloud_config}", $proc_env);
run_shell_command("/usr/local/bin/gcloud auth activate-service-account --key-file=${gcloud_key_file}", $proc_env);
run_shell_command("/usr/local/bin/gcloud config set account ${gcloud_account}", $proc_env);
run_shell_command("/usr/local/bin/gcloud config set project ${gcloud_project}", $proc_env);
break;
case 'dns_gd':
$proc_env['GD_Key'] = (string)$valObj->dns_gd_key;
Expand Down Expand Up @@ -1362,7 +1362,7 @@ function dump_postponed_updates()
Config::getInstance()->save();
Config::getInstance()->forceReload();
} else {
log_error(sprintf("AcmeClient: failed to store status '%s' for cert %s: node not found",$status_descr[$_statusCode],$_uuid));
log_error(sprintf("AcmeClient: failed to store status '%s' for cert %s: node not found", $status_descr[$_statusCode], $_uuid));
}
}
}
Expand All @@ -1388,7 +1388,7 @@ function run_shell_command($proc_cmd, $proc_env = array())
log_error(sprintf("AcmeClient: The shell command '%s' returned exit code '%d'", $proc_cmd, $result));
return($result);
} else {
log_error(sprintf("AcmeClient: Unable to prepare shell command '%s'",$proc_cmd));
log_error(sprintf("AcmeClient: Unable to prepare shell command '%s'", $proc_cmd));
return(1);
}
}
Expand Down

0 comments on commit f082183

Please sign in to comment.