mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 15:02:03 +00:00
1. save the CA url anyway.
2. clear some code.
This commit is contained in:
parent
0415c050a5
commit
a6d22e3b22
25
acme.sh
25
acme.sh
@ -52,9 +52,6 @@ DEFAULT_DOMAIN_KEY_LENGTH=2048
|
|||||||
|
|
||||||
DEFAULT_OPENSSL_BIN="openssl"
|
DEFAULT_OPENSSL_BIN="openssl"
|
||||||
|
|
||||||
_OLD_CA_HOST="https://acme-v01.api.letsencrypt.org"
|
|
||||||
_OLD_STAGE_CA_HOST="https://acme-staging.api.letsencrypt.org"
|
|
||||||
|
|
||||||
VTYPE_HTTP="http-01"
|
VTYPE_HTTP="http-01"
|
||||||
VTYPE_DNS="dns-01"
|
VTYPE_DNS="dns-01"
|
||||||
VTYPE_ALPN="tls-alpn-01"
|
VTYPE_ALPN="tls-alpn-01"
|
||||||
@ -2595,11 +2592,6 @@ _initpath() {
|
|||||||
CA_HOME="$DEFAULT_CA_HOME"
|
CA_HOME="$DEFAULT_CA_HOME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ACME_VERSION" = "2" ]; then
|
|
||||||
DEFAULT_CA="$CA_LETSENCRYPT_V2"
|
|
||||||
DEFAULT_STAGING_CA="$CA_LETSENCRYPT_V2_TEST"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$ACME_DIRECTORY" ]; then
|
if [ -z "$ACME_DIRECTORY" ]; then
|
||||||
default_acme_server=$(_readaccountconf "DEFAULT_ACME_SERVER")
|
default_acme_server=$(_readaccountconf "DEFAULT_ACME_SERVER")
|
||||||
_debug default_acme_server "$default_acme_server"
|
_debug default_acme_server "$default_acme_server"
|
||||||
@ -4088,12 +4080,9 @@ issue() {
|
|||||||
_cleardomainconf "Le_ChallengeAlias"
|
_cleardomainconf "Le_ChallengeAlias"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ACME_DIRECTORY" != "$DEFAULT_CA" ]; then
|
Le_API="$ACME_DIRECTORY"
|
||||||
Le_API="$ACME_DIRECTORY"
|
_savedomainconf "Le_API" "$Le_API"
|
||||||
_savedomainconf "Le_API" "$Le_API"
|
|
||||||
else
|
|
||||||
_cleardomainconf Le_API
|
|
||||||
fi
|
|
||||||
_info "Using CA: $ACME_DIRECTORY"
|
_info "Using CA: $ACME_DIRECTORY"
|
||||||
if [ "$_alt_domains" = "$NO_VALUE" ]; then
|
if [ "$_alt_domains" = "$NO_VALUE" ]; then
|
||||||
_alt_domains=""
|
_alt_domains=""
|
||||||
@ -4980,14 +4969,6 @@ renew() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$Le_API" ]; then
|
if [ "$Le_API" ]; then
|
||||||
if [ "$_OLD_CA_HOST" = "$Le_API" ]; then
|
|
||||||
export Le_API="$DEFAULT_CA"
|
|
||||||
_savedomainconf Le_API "$Le_API"
|
|
||||||
fi
|
|
||||||
if [ "$_OLD_STAGE_CA_HOST" = "$Le_API" ]; then
|
|
||||||
export Le_API="$DEFAULT_STAGING_CA"
|
|
||||||
_savedomainconf Le_API "$Le_API"
|
|
||||||
fi
|
|
||||||
export ACME_DIRECTORY="$Le_API"
|
export ACME_DIRECTORY="$Le_API"
|
||||||
#reload ca configs
|
#reload ca configs
|
||||||
ACCOUNT_KEY_PATH=""
|
ACCOUNT_KEY_PATH=""
|
||||||
|
Loading…
Reference in New Issue
Block a user