mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-09 18:33:34 +02:00
removed dual use of challenge_identifiers variable (fixes #511)
This commit is contained in:
@@ -667,14 +667,15 @@ sign_csr() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${ZSH_VERSION:-}" ]]; then
|
if [[ -n "${ZSH_VERSION:-}" ]]; then
|
||||||
local -A challenge_identifiers challenge_uris challenge_tokens authorizations keyauths deploy_args
|
local -A challenge_names challenge_uris challenge_tokens authorizations keyauths deploy_args
|
||||||
else
|
else
|
||||||
local -a challenge_identifiers challenge_uris challenge_tokens authorizations keyauths deploy_args
|
local -a challenge_names challenge_uris challenge_tokens authorizations keyauths deploy_args
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initial step: Find which authorizations we're dealing with
|
# Initial step: Find which authorizations we're dealing with
|
||||||
if [[ ${API} -eq 2 ]]; then
|
if [[ ${API} -eq 2 ]]; then
|
||||||
# Request new order and store authorization URIs
|
# Request new order and store authorization URIs
|
||||||
|
local challenge_identifiers=""
|
||||||
for altname in ${altnames}; do
|
for altname in ${altnames}; do
|
||||||
challenge_identifiers+="$(printf '{"type": "dns", "value": "%s"}, ' "${altname}")"
|
challenge_identifiers+="$(printf '{"type": "dns", "value": "%s"}, ' "${altname}")"
|
||||||
done
|
done
|
||||||
@@ -731,7 +732,7 @@ sign_csr() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Gather challenge information
|
# Gather challenge information
|
||||||
challenge_identifiers[${idx}]="${identifier}"
|
challenge_names[${idx}]="${identifier}"
|
||||||
challenge_tokens[${idx}]="$(echo "${challenge}" | get_json_string_value token)"
|
challenge_tokens[${idx}]="$(echo "${challenge}" | get_json_string_value token)"
|
||||||
if [[ ${API} -eq 2 ]]; then
|
if [[ ${API} -eq 2 ]]; then
|
||||||
challenge_uris[${idx}]="$(echo "${challenge}" | get_json_string_value url)"
|
challenge_uris[${idx}]="$(echo "${challenge}" | get_json_string_value url)"
|
||||||
@@ -781,7 +782,7 @@ sign_csr() {
|
|||||||
# Validate pending challenges
|
# Validate pending challenges
|
||||||
local idx=0
|
local idx=0
|
||||||
while [ ${idx} -lt ${num_pending_challenges} ]; do
|
while [ ${idx} -lt ${num_pending_challenges} ]; do
|
||||||
echo " + Responding to challenge for ${challenge_identifiers[${idx}]} authorization..."
|
echo " + Responding to challenge for ${challenge_names[${idx}]} authorization..."
|
||||||
|
|
||||||
# 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
|
||||||
if [[ ${API} -eq 1 ]]; then
|
if [[ ${API} -eq 1 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user