File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -382,16 +382,16 @@ issue() {
382382 done
383383
384384 _info " Verify finished, start to sign."
385- der=$( openssl req -in $CSR_PATH -outform DER | base64 | _b64)
385+ der=" $( openssl req -in $CSR_PATH -outform DER | base64 | _b64) "
386386 _send_signed_request " $API /acme/new-cert" " {\" resource\" : \" new-cert\" , \" csr\" : \" $der \" }"
387387
388388
389- Le_LinkCert=$( grep -i ' ^Location' $CURL_HEADER | cut -d " " -f 2)
389+ Le_LinkCert=" $( grep -i -o ' ^Location.* ' $CURL_HEADER | sed ' s/\r//g ' | cut -d " " -f 2) "
390390 _setopt $DOMAIN_CONF " Le_LinkCert" " =" " $Le_LinkCert "
391391
392- if [ " $Le_LinkCert " ] ; then
392+ if [ " $Le_LinkCert " ] ; then
393393 echo -----BEGIN CERTIFICATE----- > $CERT_PATH
394- echo $response | base64 | sed " s/ /\n/g " >> $CERT_PATH
394+ curl --silent $Le_LinkCert | base64 >> $CERT_PATH
395395 echo -----END CERTIFICATE----- >> $CERT_PATH
396396 _info " Cert success."
397397 cat $CERT_PATH
@@ -415,7 +415,7 @@ issue() {
415415 if [ " $Le_LinkIssuer " ] ; then
416416 _get " $Le_LinkIssuer "
417417 echo -----BEGIN CERTIFICATE----- > $CA_CERT_PATH
418- echo $response | base64 | sed " s/ /\n/g " >> $CA_CERT_PATH
418+ curl --silent $Le_LinkIssuer | base64 >> $CA_CERT_PATH
419419 echo -----END CERTIFICATE----- >> $CA_CERT_PATH
420420 _info " The intermediate CA cert is in $CA_CERT_PATH "
421421 fi
You can’t perform that action at this time.
0 commit comments