Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4442 #4691

Merged
merged 2 commits into from
Jul 8, 2023
Merged

4442 #4691

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,7 @@ _send_signed_request() {
if [ -z "$keyfile" ]; then
keyfile="$ACCOUNT_KEY_PATH"
fi
_debug "=======Begin Send Signed Request======="
_debug url "$url"
_debug payload "$payload"

Expand Down Expand Up @@ -4602,9 +4603,10 @@ issue() {
_d="*.$_d"
fi
_debug2 _d "$_d"
_authorizations_map="$_d,$response
_authorizations_map="$_d,$response#$_authz_url
$_authorizations_map"
done

_debug2 _authorizations_map "$_authorizations_map"

_index=0
Expand Down Expand Up @@ -4656,7 +4658,8 @@ $_authorizations_map"
_on_issue_err "$_post_hook"
return 1
fi

_authz_url="$(echo "$_candidates" | sed "s/$_idn_d,//" | _egrep_o "#.*" | sed "s/^#//")"
_debug _authz_url "$_authz_url"
if [ -z "$thumbprint" ]; then
thumbprint="$(__calc_account_thumbprint)"
fi
Expand Down Expand Up @@ -4708,7 +4711,7 @@ $_authorizations_map"
_debug keyauthorization "$keyauthorization"
fi

dvlist="$d$sep$keyauthorization$sep$uri$sep$vtype$sep$_currentRoot"
dvlist="$d$sep$keyauthorization$sep$uri$sep$vtype$sep$_currentRoot$sep$_authz_url"
_debug dvlist "$dvlist"

vlist="$vlist$dvlist$dvsep"
Expand All @@ -4725,6 +4728,7 @@ $_authorizations_map"
keyauthorization=$(echo "$ventry" | cut -d "$sep" -f 2)
vtype=$(echo "$ventry" | cut -d "$sep" -f 4)
_currentRoot=$(echo "$ventry" | cut -d "$sep" -f 5)
_authz_url=$(echo "$ventry" | cut -d "$sep" -f 6)
_debug d "$d"
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
_debug "$d is already verified, skip $vtype."
Expand Down Expand Up @@ -4850,7 +4854,7 @@ $_authorizations_map"
uri=$(echo "$ventry" | cut -d "$sep" -f 3)
vtype=$(echo "$ventry" | cut -d "$sep" -f 4)
_currentRoot=$(echo "$ventry" | cut -d "$sep" -f 5)

_authz_url=$(echo "$ventry" | cut -d "$sep" -f 6)
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
_info "$d is already verified, skip $vtype."
continue
Expand All @@ -4860,6 +4864,7 @@ $_authorizations_map"
_debug "d" "$d"
_debug "keyauthorization" "$keyauthorization"
_debug "uri" "$uri"
_debug "_authz_url" "$_authz_url"
removelevel=""
token="$(printf "%s" "$keyauthorization" | cut -d '.' -f 1)"

Expand Down Expand Up @@ -4967,6 +4972,7 @@ $_authorizations_map"
MAX_RETRY_TIMES=30
fi

_debug "Lets check the status of the authz"
while true; do
waittimes=$(_math "$waittimes" + 1)
if [ "$waittimes" -ge "$MAX_RETRY_TIMES" ]; then
Expand Down Expand Up @@ -5014,9 +5020,9 @@ $_authorizations_map"
break
fi

if [ "$status" = "pending" ]; then
if _contains "$status" "pending"; then
_info "Pending, The CA is processing your order, please just wait. ($waittimes/$MAX_RETRY_TIMES)"
elif [ "$status" = "processing" ]; then
elif _contains "$status" "processing"; then
_info "Processing, The CA is processing your order, please just wait. ($waittimes/$MAX_RETRY_TIMES)"
else
_err "$d:Verify error:$response"
Expand All @@ -5029,7 +5035,7 @@ $_authorizations_map"
_sleep 2
_debug "checking"

_send_signed_request "$uri"
_send_signed_request "$_authz_url"

if [ "$?" != "0" ]; then
_err "$d:Verify error:$response"
Expand Down