|
|
|
@ -4515,7 +4515,7 @@ issue() {
|
|
|
|
|
|
|
|
|
|
vlist="$Le_Vlist"
|
|
|
|
|
_cleardomainconf "Le_Vlist"
|
|
|
|
|
_info "Getting domain auth token for each domain"
|
|
|
|
|
_debug "Getting domain auth token for each domain"
|
|
|
|
|
sep='#'
|
|
|
|
|
dvsep=','
|
|
|
|
|
if [ -z "$vlist" ]; then
|
|
|
|
@ -4571,12 +4571,22 @@ issue() {
|
|
|
|
|
if [ "$_notAfter" ]; then
|
|
|
|
|
_newOrderObj="$_newOrderObj,\"notAfter\": \"$_notAfter\""
|
|
|
|
|
fi
|
|
|
|
|
_debug "STEP 1, Ordering a Certificate"
|
|
|
|
|
if ! _send_signed_request "$ACME_NEW_ORDER" "$_newOrderObj}"; then
|
|
|
|
|
_err "Create new order error."
|
|
|
|
|
_clearup
|
|
|
|
|
_on_issue_err "$_post_hook"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
if _contains "$response" "invalid"; then
|
|
|
|
|
if echo "$response" | _normalizeJson | grep '"status":"invalid"' >/dev/null 2>&1; then
|
|
|
|
|
_err "Create new order with invalid status."
|
|
|
|
|
_err "$response"
|
|
|
|
|
_clearup
|
|
|
|
|
_on_issue_err "$_post_hook"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
Le_LinkOrder="$(echo "$responseHeaders" | grep -i '^Location.*$' | _tail_n 1 | tr -d "\r\n " | cut -d ":" -f 2-)"
|
|
|
|
|
_debug Le_LinkOrder "$Le_LinkOrder"
|
|
|
|
@ -4601,6 +4611,7 @@ issue() {
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
_debug "STEP 2, Get the authorizations of each domain"
|
|
|
|
|
#domain and authz map
|
|
|
|
|
_authorizations_map=""
|
|
|
|
|
for _authz_url in $(echo "$_authorizations_seg" | tr ',' ' '); do
|
|
|
|
@ -4609,6 +4620,7 @@ issue() {
|
|
|
|
|
_err "get to authz error."
|
|
|
|
|
_err "_authorizations_seg" "$_authorizations_seg"
|
|
|
|
|
_err "_authz_url" "$_authz_url"
|
|
|
|
|
_err "$response"
|
|
|
|
|
_clearup
|
|
|
|
|
_on_issue_err "$_post_hook"
|
|
|
|
|
return 1
|
|
|
|
@ -4616,6 +4628,14 @@ issue() {
|
|
|
|
|
|
|
|
|
|
response="$(echo "$response" | _normalizeJson)"
|
|
|
|
|
_debug2 response "$response"
|
|
|
|
|
if echo "$response" | grep '"status":"invalid"' >/dev/null 2>&1; then
|
|
|
|
|
_err "get authz objec with invalid status, please try again later."
|
|
|
|
|
_err "_authorizations_seg" "$_authorizations_seg"
|
|
|
|
|
_err "$response"
|
|
|
|
|
_clearup
|
|
|
|
|
_on_issue_err "$_post_hook"
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
_d="$(echo "$response" | _egrep_o '"value" *: *"[^"]*"' | cut -d : -f 2- | tr -d ' "')"
|
|
|
|
|
if _contains "$response" "\"wildcard\" *: *true"; then
|
|
|
|
|
_d="*.$_d"
|
|
|
|
|