From: Lukas Schauer Date: Wed, 6 Apr 2022 23:33:48 +0000 (+0200) Subject: rfc8738: only replace ip with reverse dns thingy if tls-alpn-01 is used X-Git-Tag: v0.7.1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=861f4c733dbc6ef00d214322ac0b355f22de091b;p=thirdparty%2Fdehydrated.git rfc8738: only replace ip with reverse dns thingy if tls-alpn-01 is used --- diff --git a/dehydrated b/dehydrated index c54dc56..e5b9783 100755 --- a/dehydrated +++ b/dehydrated @@ -1124,7 +1124,7 @@ sign_csr() { challenge="$(echo "${response}" | get_json_dict_value -p '"challenges",'"${challengeindex}")" # Gather challenge information - if [ "${identifier_type:-}" = "ip" ]; then + if [ "${identifier_type:-}" = "ip" ] && [ "${CHALLENGETYPE}" = "tls-alpn-01" ] ; then challenge_names[${idx}]="$(echo "${identifier}" | ip_to_ptr)" else challenge_names[${idx}]="${identifier}" @@ -1161,7 +1161,7 @@ sign_csr() { esac keyauths[${idx}]="${keyauth}" - if [ "${identifier_type:-}" = "ip" ]; then + if [ "${identifier_type:-}" = "ip" ] && [ "${CHALLENGETYPE}" = "tls-alpn-01" ]; then deploy_args[${idx}]="$(echo "${identifier}" | ip_to_ptr) ${challenge_tokens[${idx}]} ${keyauth_hook}" else deploy_args[${idx}]="${identifier} ${challenge_tokens[${idx}]} ${keyauth_hook}"