From a31e4fafd94b240324898348e3e7f898b62e1db2 Mon Sep 17 00:00:00 2001 From: Emily Karisch Date: Mon, 30 Sep 2019 14:54:34 +0200 Subject: [PATCH 1/2] Use HTTP 1.1 as workaround atm Fixes #423 --- getssl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/getssl b/getssl index 7f3713e..45a3a8e 100755 --- a/getssl +++ b/getssl @@ -184,10 +184,11 @@ # 2017-01-30 issue #243 compatibility with bash 3.0 (2.08) # 2017-01-30 issue #243 additional compatibility with bash 3.0 (2.09) # 2017-02-18 add OCSP Must-Staple to the domain csr generation (2.10) +# 2017-09-30 issue #423 Use HTTP 1.1 as workaround atm (2.11) # ---------------------------------------------------------------------------------------- PROGNAME=${0##*/} -VERSION="2.10" +VERSION="2.11" # defaults ACCOUNT_KEY_LENGTH=4096 @@ -1135,7 +1136,7 @@ send_signed_request() { # Sends a request to the ACME server, signed with your p CURL_HEADER="$TEMP_DIR/curl.header" dp="$TEMP_DIR/curl.dump" - CURL="curl --silent --dump-header $CURL_HEADER " + CURL="curl --http1.1 --silent --dump-header $CURL_HEADER " if [[ ${_USE_DEBUG} -eq 1 ]]; then CURL="$CURL --trace-ascii $dp " fi From 3f0b749e2b5a67b00312ad4fd91cbfbeba38d355 Mon Sep 17 00:00:00 2001 From: Emily Karisch Date: Tue, 1 Oct 2019 13:22:09 +0200 Subject: [PATCH 2/2] Check curl version if it supports the --http1.1 flag Co-authored-by: Robert Eden --- getssl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/getssl b/getssl index 45a3a8e..1a42c78 100755 --- a/getssl +++ b/getssl @@ -1136,7 +1136,14 @@ send_signed_request() { # Sends a request to the ACME server, signed with your p CURL_HEADER="$TEMP_DIR/curl.header" dp="$TEMP_DIR/curl.dump" - CURL="curl --http1.1 --silent --dump-header $CURL_HEADER " + + CURL="curl " + if [[ "$($CURL -V | head -1 | cut -d' ' -f2 )" > "7.33" ]]; then + CURL="$CURL --http1.1 " + fi + + CURL="$CURL --silent --dump-header $CURL_HEADER " + if [[ ${_USE_DEBUG} -eq 1 ]]; then CURL="$CURL --trace-ascii $dp " fi