From e4a552da2504fa2700cd10fd0bd14ab2860ce694 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 27 Dec 2015 19:27:43 +0800 Subject: [PATCH] fix the error message --- le.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/le.sh b/le.sh index 5fb88ff4..9d5234f0 100755 --- a/le.sh +++ b/le.sh @@ -175,7 +175,7 @@ _send_signed_request() { response="$($CURL -X POST --data "$body" $url)" fi - responseHeaders="$(cat $CURL_HEADER)" + responseHeaders="$(cat $CURL_HEADER | sed 's/\r//g')" _debug responseHeaders "$responseHeaders" _debug response "$response" @@ -417,7 +417,7 @@ issue() { _setopt $DOMAIN_CONF "Le_Keylength" "=" "$Le_Keylength" if [ -z "$Le_LinkCert" ] ; then - response="$(echo $response | base64 -d)" + response="$(echo $response | sed 's/ //g'| base64 -d)" _info "Sign failed: $(echo "$response" | grep -o '"detail":"[^"]*"')" return 1 fi @@ -426,7 +426,6 @@ issue() { _setopt $DOMAIN_CONF "Le_LinkIssuer" "=" "$Le_LinkIssuer" if [ "$Le_LinkIssuer" ] ; then - _get "$Le_LinkIssuer" echo -----BEGIN CERTIFICATE----- > $CA_CERT_PATH curl --silent $Le_LinkIssuer | base64 >> $CA_CERT_PATH echo -----END CERTIFICATE----- >> $CA_CERT_PATH