]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
fix behaviour for fetching missing additional account information with unknown keys
authorLukas Schauer <lukas@schauer.so>
Fri, 13 Apr 2018 20:09:52 +0000 (22:09 +0200)
committerLukas Schauer <lukas@schauer.so>
Fri, 13 Apr 2018 20:09:52 +0000 (22:09 +0200)
dehydrated

index 7ca92bf6d18be3d0d16270195d1615d63b3e65fb..27384951e139caabbe4a80cc7e9a3dc75c3b703f 100755 (executable)
@@ -402,10 +402,9 @@ init_system() {
   else
     echo "Fetching missing account information from CA..."
     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')"
-      ACCOUNT_INFO="$(signed_request "${ACCOUNT_URL}" '{"resource": "reg"}')"
+      _exiterr "This is not implemented for ACMEv1! Consider switching to ACMEv2 :)"
     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}" '{}')"
     fi
     ACCOUNT_ID="${ACCOUNT_URL##*/}"