mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Deprecate GET acme v2
This commit is contained in:
parent
af94a23962
commit
2dc4adb08e
1 changed files with 10 additions and 2 deletions
|
@ -53,7 +53,10 @@ query_le_v2() {
|
|||
post_data=$post_data'"payload":"'"$payload_"'",'
|
||||
post_data=$post_data'"signature":"'"$signature_"'"}'
|
||||
|
||||
curl -s -i -d "$post_data" "$1" -H "$content"
|
||||
# Save http response to file passed as "$4" arg or print to stdout if not provided
|
||||
# http response headers are always sent to stdout
|
||||
local save_to_file=${4:-"/dev/stdout"}
|
||||
curl --silent --dump-header /dev/stdout --data "$post_data" "$1" --header "$content" --output "$save_to_file"
|
||||
}
|
||||
|
||||
|
||||
|
@ -232,7 +235,12 @@ if [[ "$status" -ne 200 ]]; then
|
|||
fi
|
||||
|
||||
# Downloading signed certificate / STEP 7
|
||||
curl -s "$certificate" -o $ssl_dir/$domain.pem
|
||||
answer=$(query_le_v2 "$certificate" "" "$nonce" "$ssl_dir/$domain.pem")
|
||||
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
|
||||
if [[ "$status" -ne 200 ]]; then
|
||||
[ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
|
||||
check_result $E_NOTEXIST "Let's Encrypt downloading signed cert failed status: $status"
|
||||
fi
|
||||
|
||||
# Splitting up downloaded pem
|
||||
crt_end=$(grep -n END $ssl_dir/$domain.pem |head -n1 |cut -f1 -d:)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue