mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
added support for HTTP/2 Let's Encrypt servers
This commit is contained in:
parent
84ef0a118f
commit
ae328a0935
2 changed files with 13 additions and 13 deletions
|
@ -103,16 +103,16 @@ fi
|
|||
|
||||
|
||||
# Requesting ACME nonce
|
||||
nonce=$(curl -s -I "$API/directory" |grep Nonce |cut -f 2 -d \ |tr -d '\r\n')
|
||||
nonce=$(curl -s -I "$API/directory" |grep -i nonce |cut -f2 -d\ |tr -d '\r\n')
|
||||
|
||||
# Creating ACME account
|
||||
url="$API/acme/new-acct"
|
||||
payload='{"termsOfServiceAgreed": true}'
|
||||
answer=$(query_le_v2 "$url" "$payload" "$nonce")
|
||||
kid=$(echo "$answer" |grep Location: |cut -f2 -d ' '|tr -d '\r')
|
||||
kid=$(echo "$answer" |grep -i location: |cut -f2 -d ' '|tr -d '\r')
|
||||
|
||||
# Checking answer status
|
||||
status=$(echo "$answer" |grep HTTP/1.1 |tail -n1 |cut -f2 -d ' ')
|
||||
status=$(echo "$answer" |grep HTTP/ |tail -n1 |cut -f2 -d ' ')
|
||||
if [[ "${status:0:2}" -ne "20" ]]; then
|
||||
check_result $E_CONNECT "Let's Encrypt acc registration failed $status"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue