From 91d0bfb6b16b725f3926a185d5004d30b9b96aff Mon Sep 17 00:00:00 2001 From: Tim Kimber Date: Wed, 15 Jan 2020 22:12:43 +0000 Subject: [PATCH] Fix base64 invalid input error --- getssl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/getssl b/getssl index 7513eb5..bc91122 100755 --- a/getssl +++ b/getssl @@ -1436,10 +1436,9 @@ send_signed_request() { # Sends a request to the ACME server, signed with your p fi responseHeaders=$(cat "$CURL_HEADER") - if [[ "$needbase64" && ${response##*()} != "{"* ]]; then - # response is in base64 too, decode - #!FIXME need to use openssl base64 decoder if it exists - response=$(echo "$response" | base64 -d) + if [[ "$needbase64" && ${response##\()} != "{"* ]]; then + # response is in base64 too, decode (append = to otherwise openssl truncates output) + response=$(echo "${response}=" | openssl base64 -d) fi debug responseHeaders "$responseHeaders"