mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-09 16:01:46 +00:00
Update authentication logic / info
This commit is contained in:
parent
f9e3a2132f
commit
5e165819a1
@ -51,6 +51,11 @@ _acmeproxy_request() {
|
||||
_saveaccountconf_mutable ACMEPROXY_USERNAME "$ACMEPROXY_USERNAME"
|
||||
_saveaccountconf_mutable ACMEPROXY_PASSWORD "$ACMEPROXY_PASSWORD"
|
||||
|
||||
if [ -z "$ACMEPROXY_USERNAME" ] || [ -z "$ACMEPROXY_PASSWORD" ]; then
|
||||
_info "ACMEPROXY_USERNAME and/or ACMEPROXY_PASSWORD not set - using without client authentication! Make sure you're using server authentication (e.g. IP-based)"
|
||||
export _H1="Accept: application/json"
|
||||
export _H2="Content-Type: application/json"
|
||||
else
|
||||
## Base64 encode the credentials
|
||||
credentials=$(printf "%b" "$ACMEPROXY_USERNAME:$ACMEPROXY_PASSWORD" | _base64)
|
||||
|
||||
@ -58,6 +63,7 @@ _acmeproxy_request() {
|
||||
export _H1="Authorization: Basic $credentials"
|
||||
export _H2="Accept: application/json"
|
||||
export _H3="Content-Type: application/json"
|
||||
fi
|
||||
|
||||
## Add the challenge record to the acmeproxy grid member
|
||||
response="$(_post "{\"fqdn\": \"$fulldomain.\", \"value\": \"$txtvalue\"}" "$ACMEPROXY_ENDPOINT/$action" "" "POST")"
|
||||
|
Loading…
Reference in New Issue
Block a user