|
|
@ -4119,8 +4119,18 @@ $_authorizations_map" |
|
|
|
|
|
|
|
entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')" |
|
|
|
_debug entry "$entry" |
|
|
|
keyauthorization="" |
|
|
|
if [ -z "$entry" ]; then |
|
|
|
_err "Error, can not get domain token entry $d" |
|
|
|
if ! _startswith "$d" '*.'; then |
|
|
|
_debug "Not a wildcard domain, lets check whether the validation is already valid." |
|
|
|
if echo "$response" | grep '"status":"valid"' >/dev/null 2>&1; then |
|
|
|
_debug "$d is already valid." |
|
|
|
keyauthorization="$STATE_VERIFIED" |
|
|
|
_debug keyauthorization "$keyauthorization" |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -z "$keyauthorization" ]; then |
|
|
|
_err "Error, can not get domain token entry $d for $vtype" |
|
|
|
_supported_vtypes="$(echo "$response" | _egrep_o "\"challenges\":\[[^]]*]" | tr '{' "\n" | grep type | cut -d '"' -f 4 | tr "\n" ' ')" |
|
|
|
if [ "$_supported_vtypes" ]; then |
|
|
|
_err "The supported validation types are: $_supported_vtypes, but you specified: $vtype" |
|
|
@ -4129,6 +4139,9 @@ $_authorizations_map" |
|
|
|
_on_issue_err "$_post_hook" |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -z "$keyauthorization" ]; then |
|
|
|
token="$(echo "$entry" | _egrep_o '"token":"[^"]*' | cut -d : -f 2 | tr -d '"')" |
|
|
|
_debug token "$token" |
|
|
|
|
|
|
@ -4159,6 +4172,7 @@ $_authorizations_map" |
|
|
|
keyauthorization="$STATE_VERIFIED" |
|
|
|
_debug keyauthorization "$keyauthorization" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
dvlist="$d$sep$keyauthorization$sep$uri$sep$vtype$sep$_currentRoot" |
|
|
|
_debug dvlist "$dvlist" |
|
|
|