Browse Source

Ignore case finding location in responseHeaders

pull/452/head
Tim Kimber 6 years ago
parent
commit
1c169ba603
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      getssl

+ 4
- 4
getssl View File

@ -1406,7 +1406,7 @@ send_signed_request() { # Sends a request to the ACME server, signed with your p
body="${body}\"signature\": \"${signed64}\"}"
debug "header, payload and signature = $body"
fi
code="500"
loop_limit=5
while [[ "$code" -eq 500 ]]; do
@ -2062,7 +2062,7 @@ get_signing_params "$ACCOUNT_KEY"
info "Registering account"
# send the request to the ACME server.
if [[ $API -eq 1 ]]; then
if [[ $API -eq 1 ]]; then
if [[ "$ACCOUNT_EMAIL" ]] ; then
regjson='{"resource": "new-reg", "contact": ["mailto: '$ACCOUNT_EMAIL'"], "agreement": "'$AGREEMENT'"}'
else
@ -2079,11 +2079,11 @@ elif [[ $API -eq 2 ]]; then
else
debug "cant determine account API"
graceful_exit
fi
fi
if [[ "$code" == "" ]] || [[ "$code" == '201' ]] ; then
info "Registered"
KID=$(echo "$responseHeaders" | grep location | awk '{print $2}'| tr -d '\r\n ')
KID=$(echo "$responseHeaders" | grep -i "^location" | awk '{print $2}'| tr -d '\r\n ')
debug "KID=_$KID}_"
echo "$response" > "$TEMP_DIR/account.json"
elif [[ "$code" == '409' ]] ; then


Loading…
Cancel
Save