mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-06-16 05:02:45 +00:00
Skip verification if the account is already verified
This commit is contained in:
parent
8ad71801eb
commit
4d14d2e911
55
le.sh
55
le.sh
@ -553,31 +553,40 @@ issue() {
|
|||||||
alldomains=$(echo "$Le_Domain,$Le_Alt" | sed "s/,/ /g")
|
alldomains=$(echo "$Le_Domain,$Le_Alt" | sed "s/,/ /g")
|
||||||
for d in $alldomains
|
for d in $alldomains
|
||||||
do
|
do
|
||||||
_info "Geting token for domain" $d
|
# check if domain is already verified for the account
|
||||||
_send_signed_request "$API/acme/new-authz" "{\"resource\": \"new-authz\", \"identifier\": {\"type\": \"dns\", \"value\": \"$d\"}}"
|
_info "Checking if domain is already verified"
|
||||||
if [ ! -z "$code" ] && [ ! "$code" == '201' ] ; then
|
uri=$(echo $d | cut -d $sep -f 3)
|
||||||
_err "new-authz error: $response"
|
if ! _get $uri ; then
|
||||||
_clearup
|
_err "$d:Verify pending"
|
||||||
return 1
|
|
||||||
|
_info "Geting token for domain" $d
|
||||||
|
_send_signed_request "$API/acme/new-authz" "{\"resource\": \"new-authz\", \"identifier\": {\"type\": \"dns\", \"value\": \"$d\"}}"
|
||||||
|
if [ ! -z "$code" ] && [ ! "$code" == '201' ] ; then
|
||||||
|
_err "new-authz error: $response"
|
||||||
|
_clearup
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
entry=$(echo $response | egrep -o '{[^{]*"type":"'$vtype'"[^}]*')
|
||||||
|
_debug entry "$entry"
|
||||||
|
|
||||||
|
token=$(echo "$entry" | sed 's/,/\n'/g| grep '"token":'| cut -d : -f 2|sed 's/"//g')
|
||||||
|
_debug token $token
|
||||||
|
|
||||||
|
uri=$(echo "$entry" | sed 's/,/\n'/g| grep '"uri":'| cut -d : -f 2,3|sed 's/"//g')
|
||||||
|
_debug uri $uri
|
||||||
|
|
||||||
|
keyauthorization="$token.$thumbprint"
|
||||||
|
_debug keyauthorization "$keyauthorization"
|
||||||
|
|
||||||
|
dvlist="$d$sep$keyauthorization$sep$uri"
|
||||||
|
_debug dvlist "$dvlist"
|
||||||
|
|
||||||
|
vlist="$vlist$dvlist,"
|
||||||
|
else
|
||||||
|
_info "$d:Already verified"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
entry=$(echo $response | egrep -o '{[^{]*"type":"'$vtype'"[^}]*')
|
|
||||||
_debug entry "$entry"
|
|
||||||
|
|
||||||
token=$(echo "$entry" | sed 's/,/\n'/g| grep '"token":'| cut -d : -f 2|sed 's/"//g')
|
|
||||||
_debug token $token
|
|
||||||
|
|
||||||
uri=$(echo "$entry" | sed 's/,/\n'/g| grep '"uri":'| cut -d : -f 2,3|sed 's/"//g')
|
|
||||||
_debug uri $uri
|
|
||||||
|
|
||||||
keyauthorization="$token.$thumbprint"
|
|
||||||
_debug keyauthorization "$keyauthorization"
|
|
||||||
|
|
||||||
dvlist="$d$sep$keyauthorization$sep$uri"
|
|
||||||
_debug dvlist "$dvlist"
|
|
||||||
|
|
||||||
vlist="$vlist$dvlist,"
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
#add entry
|
#add entry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user