diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 516e1ef10a..c0bd11617f 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts PKG_VERSION:=2.8.5 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LICENSE:=GPL-2.0 diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh index db98e74172..5d5958d981 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh @@ -621,9 +621,15 @@ do_transfer() { local __CNT=0 # error counter local __PROG __RUNPROG local __FALLBACK_RUNPROG __FALLBACK_DESC + local __HTTPS=$use_https [ $# -ne 1 ] && write_log 12 "Error in 'do_transfer()' - wrong number of parameters" + # an https:// URL needs HTTPS support and the cacert settings even without use_https + case "$__URL" in + https://*) __HTTPS=1 ;; + esac + # Use ip_network as default for bind_network if not separately specified [ -z "$bind_network" ] && [ "$ip_source" = "network" ] && [ "$ip_network" ] && bind_network="$ip_network" @@ -645,7 +651,7 @@ do_transfer() { [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" # force IPv4/IPv6 fi # set certificate parameters - if [ $use_https -eq 1 ]; then + if [ $__HTTPS -eq 1 ]; then if [ "$cacert" = "IGNORE" ]; then # idea from Ticket #15327 to ignore server cert __PROG="$__PROG --no-check-certificate" elif [ -f "$cacert" ]; then @@ -674,7 +680,7 @@ do_transfer() { elif [ -n "$CURL" ]; then __PROG="$CURL -RsS -o $DATFILE --stderr $ERRFILE" # check HTTPS support - [ -z "$CURL_SSL" -a $use_https -eq 1 ] && \ + [ -z "$CURL_SSL" -a $__HTTPS -eq 1 ] && \ write_log 13 "cURL: libcurl compiled without https support" # force network/interface-device to use for communication if [ -n "$bind_network" ]; then @@ -695,7 +701,7 @@ do_transfer() { [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" # force IPv4/IPv6 fi # set certificate parameters - if [ $use_https -eq 1 ]; then + if [ $__HTTPS -eq 1 ]; then if [ "$cacert" = "IGNORE" ]; then # idea from Ticket #15327 to ignore server cert __PROG="$__PROG --insecure" # but not empty better to use "IGNORE" elif [ -f "$cacert" ]; then @@ -733,12 +739,12 @@ do_transfer() { [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" # force IPv4/IPv6 fi # https possibly not supported - [ $use_https -eq 1 -a -z "$UCLIENT_FETCH_SSL" ] && \ + [ $__HTTPS -eq 1 -a -z "$UCLIENT_FETCH_SSL" ] && \ write_log 14 "uclient-fetch: no HTTPS support! Additional install one of ustream-ssl packages" # proxy support [ -z "$proxy" ] && __PROG="$__PROG -Y off" || __PROG="$__PROG -Y on" # https & certificates - if [ $use_https -eq 1 ]; then + if [ $__HTTPS -eq 1 ]; then if [ "$cacert" = "IGNORE" ]; then __PROG="$__PROG --no-check-certificate" elif [ -f "$cacert" ]; then @@ -760,7 +766,7 @@ do_transfer() { [ $force_ipversion -eq 1 ] && \ write_log 14 "BusyBox Wget: Force connecting to IPv4 or IPv6 addresses not supported" # https not supported - [ $use_https -eq 1 ] && \ + [ $__HTTPS -eq 1 ] && \ write_log 14 "BusyBox Wget: no HTTPS support" # disable proxy if no set (there might be .wgetrc or .curlrc or wrong environment set) [ -z "$proxy" ] && __PROG="$__PROG -Y off"