Browse Source

Merge pull request #4691 from acmesh-official/4442

4442
pull/4700/head
neil 1 year ago
committed by GitHub
parent
commit
b7c370fff7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      acme.sh

20
acme.sh

@ -2116,6 +2116,7 @@ _send_signed_request() {
if [ -z "$keyfile" ]; then if [ -z "$keyfile" ]; then
keyfile="$ACCOUNT_KEY_PATH" keyfile="$ACCOUNT_KEY_PATH"
fi fi
_debug "=======Begin Send Signed Request======="
_debug url "$url" _debug url "$url"
_debug payload "$payload" _debug payload "$payload"
@ -4602,9 +4603,10 @@ issue() {
_d="*.$_d" _d="*.$_d"
fi fi
_debug2 _d "$_d" _debug2 _d "$_d"
_authorizations_map="$_d,$response
_authorizations_map="$_d,$response#$_authz_url
$_authorizations_map" $_authorizations_map"
done done
_debug2 _authorizations_map "$_authorizations_map" _debug2 _authorizations_map "$_authorizations_map"
_index=0 _index=0
@ -4656,7 +4658,8 @@ $_authorizations_map"
_on_issue_err "$_post_hook" _on_issue_err "$_post_hook"
return 1 return 1
fi fi
_authz_url="$(echo "$_candidates" | sed "s/$_idn_d,//" | _egrep_o "#.*" | sed "s/^#//")"
_debug _authz_url "$_authz_url"
if [ -z "$thumbprint" ]; then if [ -z "$thumbprint" ]; then
thumbprint="$(__calc_account_thumbprint)" thumbprint="$(__calc_account_thumbprint)"
fi fi
@ -4708,7 +4711,7 @@ $_authorizations_map"
_debug keyauthorization "$keyauthorization" _debug keyauthorization "$keyauthorization"
fi 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" _debug dvlist "$dvlist"
vlist="$vlist$dvlist$dvsep" vlist="$vlist$dvlist$dvsep"
@ -4725,6 +4728,7 @@ $_authorizations_map"
keyauthorization=$(echo "$ventry" | cut -d "$sep" -f 2) keyauthorization=$(echo "$ventry" | cut -d "$sep" -f 2)
vtype=$(echo "$ventry" | cut -d "$sep" -f 4) vtype=$(echo "$ventry" | cut -d "$sep" -f 4)
_currentRoot=$(echo "$ventry" | cut -d "$sep" -f 5) _currentRoot=$(echo "$ventry" | cut -d "$sep" -f 5)
_authz_url=$(echo "$ventry" | cut -d "$sep" -f 6)
_debug d "$d" _debug d "$d"
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
_debug "$d is already verified, skip $vtype." _debug "$d is already verified, skip $vtype."
@ -4850,7 +4854,7 @@ $_authorizations_map"
uri=$(echo "$ventry" | cut -d "$sep" -f 3) uri=$(echo "$ventry" | cut -d "$sep" -f 3)
vtype=$(echo "$ventry" | cut -d "$sep" -f 4) vtype=$(echo "$ventry" | cut -d "$sep" -f 4)
_currentRoot=$(echo "$ventry" | cut -d "$sep" -f 5) _currentRoot=$(echo "$ventry" | cut -d "$sep" -f 5)
_authz_url=$(echo "$ventry" | cut -d "$sep" -f 6)
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
_info "$d is already verified, skip $vtype." _info "$d is already verified, skip $vtype."
continue continue
@ -4860,6 +4864,7 @@ $_authorizations_map"
_debug "d" "$d" _debug "d" "$d"
_debug "keyauthorization" "$keyauthorization" _debug "keyauthorization" "$keyauthorization"
_debug "uri" "$uri" _debug "uri" "$uri"
_debug "_authz_url" "$_authz_url"
removelevel="" removelevel=""
token="$(printf "%s" "$keyauthorization" | cut -d '.' -f 1)" token="$(printf "%s" "$keyauthorization" | cut -d '.' -f 1)"
@ -4967,6 +4972,7 @@ $_authorizations_map"
MAX_RETRY_TIMES=30 MAX_RETRY_TIMES=30
fi fi
_debug "Lets check the status of the authz"
while true; do while true; do
waittimes=$(_math "$waittimes" + 1) waittimes=$(_math "$waittimes" + 1)
if [ "$waittimes" -ge "$MAX_RETRY_TIMES" ]; then if [ "$waittimes" -ge "$MAX_RETRY_TIMES" ]; then
@ -5014,9 +5020,9 @@ $_authorizations_map"
break break
fi 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)" _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)" _info "Processing, The CA is processing your order, please just wait. ($waittimes/$MAX_RETRY_TIMES)"
else else
_err "$d:Verify error:$response" _err "$d:Verify error:$response"
@ -5029,7 +5035,7 @@ $_authorizations_map"
_sleep 2 _sleep 2
_debug "checking" _debug "checking"
_send_signed_request "$uri"
_send_signed_request "$_authz_url"
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
_err "$d:Verify error:$response" _err "$d:Verify error:$response"

Loading…
Cancel
Save