Browse Source

Allow renewal of staging certs and honor --staging/--test flags.

It is nice to be able to reliably test cert renewals, such as when a cert is
requested in an application using a different method than it is being renewed
as, such as when a cert is obtained through standalone mode, and then expected
to renew through nginx/apache.

Testing renewals by running the cron command swaps out staging cert requests
for production ones.

Operators may want to test the renewal command and append --force --test
of the form:
`acme.sh --cron --home="/home/letsencrypt" --force --test`

make the --test flag (or --staging) flag on this command honor the request to
continue to use staging servers for renewals when requested.

related to #6368
pull/6464/head
Jeff Wong 3 months ago
parent
commit
b96ac02b18
No known key found for this signature in database GPG Key ID: D4EEB78E484F8A83
  1. 30
      acme.sh

30
acme.sh

@ -5454,20 +5454,22 @@ renew() {
. "$DOMAIN_CONF"
_debug Le_API "$Le_API"
case "$Le_API" in
"$CA_LETSENCRYPT_V2_TEST")
_info "Switching back to $CA_LETSENCRYPT_V2"
Le_API="$CA_LETSENCRYPT_V2"
;;
"$CA_BUYPASS_TEST")
_info "Switching back to $CA_BUYPASS"
Le_API="$CA_BUYPASS"
;;
"$CA_GOOGLE_TEST")
_info "Switching back to $CA_GOOGLE"
Le_API="$CA_GOOGLE"
;;
esac
if [ -z "$STAGE" ]; then
case "$Le_API" in
"$CA_LETSENCRYPT_V2_TEST")
_info "Switching back to $CA_LETSENCRYPT_V2"
Le_API="$CA_LETSENCRYPT_V2"
;;
"$CA_BUYPASS_TEST")
_info "Switching back to $CA_BUYPASS"
Le_API="$CA_BUYPASS"
;;
"$CA_GOOGLE_TEST")
_info "Switching back to $CA_GOOGLE"
Le_API="$CA_GOOGLE"
;;
esac
fi
if [ "$_server" ]; then
Le_API="$_server"

Loading…
Cancel
Save