mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-10 23:22:44 +02:00
fix behaviour for fetching missing additional account information with unknown keys
This commit is contained in:
+2
-3
@@ -402,10 +402,9 @@ init_system() {
|
|||||||
else
|
else
|
||||||
echo "Fetching missing account information from CA..."
|
echo "Fetching missing account information from CA..."
|
||||||
if [[ ${API} -eq 1 ]]; then
|
if [[ ${API} -eq 1 ]]; then
|
||||||
ACCOUNT_URL="$(signed_request "${CA_NEW_REG}" '{"resource": "new-reg", "onlyReturnExisting": true}' 4>&1 | grep ^Location: | awk '{print $2}' | tr -d '\r\n')"
|
_exiterr "This is not implemented for ACMEv1! Consider switching to ACMEv2 :)"
|
||||||
ACCOUNT_INFO="$(signed_request "${ACCOUNT_URL}" '{"resource": "reg"}')"
|
|
||||||
else
|
else
|
||||||
ACCOUNT_URL="$(signed_request "${CA_NEW_ACCOUNT}" '{"only-return-existing": true}' 4>&1 | grep ^Location: | awk '{print $2}' | tr -d '\r\n')"
|
ACCOUNT_URL="$(signed_request "${CA_NEW_ACCOUNT}" '{"onlyReturnExisting": true}' 4>&1 | grep ^Location: | awk '{print $2}' | tr -d '\r\n')"
|
||||||
ACCOUNT_INFO="$(signed_request "${ACCOUNT_URL}" '{}')"
|
ACCOUNT_INFO="$(signed_request "${ACCOUNT_URL}" '{}')"
|
||||||
fi
|
fi
|
||||||
ACCOUNT_ID="${ACCOUNT_URL##*/}"
|
ACCOUNT_ID="${ACCOUNT_URL##*/}"
|
||||||
|
|||||||
Reference in New Issue
Block a user