mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-14 17:12:55 +02:00
removed some spaces
This commit is contained in:
+7
-7
@@ -524,32 +524,32 @@ sign_csr() {
|
|||||||
for altname in "${challenge_altnames[@]:0}"; do
|
for altname in "${challenge_altnames[@]:0}"; do
|
||||||
challenge_token="${challenge_tokens[${idx}]}"
|
challenge_token="${challenge_tokens[${idx}]}"
|
||||||
keyauth="${keyauths[${idx}]}"
|
keyauth="${keyauths[${idx}]}"
|
||||||
|
|
||||||
# Wait for hook script to deploy the challenge if used
|
# Wait for hook script to deploy the challenge if used
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
[[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]] && "${HOOK}" "deploy_challenge" ${deploy_args[${idx}]}
|
[[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]] && "${HOOK}" "deploy_challenge" ${deploy_args[${idx}]}
|
||||||
|
|
||||||
# Ask the acme-server to verify our challenge and wait until it is no longer pending
|
# Ask the acme-server to verify our challenge and wait until it is no longer pending
|
||||||
echo " + Responding to challenge for ${altname}..."
|
echo " + Responding to challenge for ${altname}..."
|
||||||
result="$(signed_request "${challenge_uris[${idx}]}" '{"resource": "challenge", "keyAuthorization": "'"${keyauth}"'"}' | clean_json)"
|
result="$(signed_request "${challenge_uris[${idx}]}" '{"resource": "challenge", "keyAuthorization": "'"${keyauth}"'"}' | clean_json)"
|
||||||
|
|
||||||
reqstatus="$(printf '%s\n' "${result}" | get_json_string_value status)"
|
reqstatus="$(printf '%s\n' "${result}" | get_json_string_value status)"
|
||||||
|
|
||||||
while [[ "${reqstatus}" = "pending" ]]; do
|
while [[ "${reqstatus}" = "pending" ]]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
result="$(http_request get "${challenge_uris[${idx}]}")"
|
result="$(http_request get "${challenge_uris[${idx}]}")"
|
||||||
reqstatus="$(printf '%s\n' "${result}" | get_json_string_value status)"
|
reqstatus="$(printf '%s\n' "${result}" | get_json_string_value status)"
|
||||||
done
|
done
|
||||||
|
|
||||||
[[ "${CHALLENGETYPE}" = "http-01" ]] && rm -f "${WELLKNOWN}/${challenge_token}"
|
[[ "${CHALLENGETYPE}" = "http-01" ]] && rm -f "${WELLKNOWN}/${challenge_token}"
|
||||||
|
|
||||||
# Wait for hook script to clean the challenge if used
|
# Wait for hook script to clean the challenge if used
|
||||||
if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]] && [[ -n "${challenge_token}" ]]; then
|
if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]] && [[ -n "${challenge_token}" ]]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
"${HOOK}" "clean_challenge" ${deploy_args[${idx}]}
|
"${HOOK}" "clean_challenge" ${deploy_args[${idx}]}
|
||||||
fi
|
fi
|
||||||
idx=$((idx+1))
|
idx=$((idx+1))
|
||||||
|
|
||||||
if [[ "${reqstatus}" = "valid" ]]; then
|
if [[ "${reqstatus}" = "valid" ]]; then
|
||||||
echo " + Challenge is valid!"
|
echo " + Challenge is valid!"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user