@@ -1115,14 +1115,14 @@ copy_file_to_location() { # copies a file, using scp, sftp or ftp if required.
11151115 SFTP_PORT=" :990"
11161116 fi
11171117 # shellcheck disable=SC2086
1118- debug curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftps://${ftphost}${SFTP_PORT} /${ftpdirn} /"
1118+ debug curl ${_NOMETER} $FTPS_OPTIONS " ${_CURL_SSL_REQD} " -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftps://${ftphost}${SFTP_PORT} /${ftpdirn} /"
11191119 # shellcheck disable=SC2086
1120- curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftps://${ftphost}${SFTP_PORT} /${ftpdirn} /"
1120+ curl ${_NOMETER} $FTPS_OPTIONS " ${_CURL_SSL_REQD} " -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftps://${ftphost}${SFTP_PORT} /${ftpdirn} /"
11211121 else
11221122 # shellcheck disable=SC2086
1123- debug curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftp://${ftphost}${SFTP_PORT} /${ftpdirn} /"
1123+ debug curl ${_NOMETER} $FTPS_OPTIONS " ${_CURL_SSL_REQD} " -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftp://${ftphost}${SFTP_PORT} /${ftpdirn} /"
11241124 # shellcheck disable=SC2086
1125- curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftp://${ftphost}${SFTP_PORT} /${ftpdirn} /"
1125+ curl ${_NOMETER} $FTPS_OPTIONS " ${_CURL_SSL_REQD} " -u " ${ftpuser} :${ftppass} " -T " ${fromdir} /${fromfile} " " ftp://${ftphost}${SFTP_PORT} /${ftpdirn} /"
11261126 fi
11271127 else
11281128 if ! mkdir -p " $( dirname " $to " ) " ; then
@@ -1620,10 +1620,10 @@ for d in "${alldomains[@]}"; do
16201620 if [[ " ${to: 0: 5} " == " ftps:" ]] ; then
16211621 [ -z " $FTP_PORT " ] && SFTP_PORT=" :990"
16221622 # shellcheck disable=SC2086
1623- curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u " ${ftpuser} :${ftppass} " --silent -Q " DELE /${ftplocn} /${token:? } }" " ftp://${ftphost}${SFTP_PORT} /${ftplocn} /"
1623+ curl ${_NOMETER} $FTPS_OPTIONS " ${_CURL_SSL_REQD} " -u " ${ftpuser} :${ftppass} " --silent -Q " DELE /${ftplocn} /${token:? } }" " ftp://${ftphost}${SFTP_PORT} /${ftplocn} /"
16241624 else
16251625 # shellcheck disable=SC2086
1626- curl ${_NOMETER} $FTPS_OPTIONS --ssl-reqd -u " ${ftpuser} :${ftppass} " --silent -Q " DELE /${ftplocn} /${token:? } " " ftp://${ftphost}${SFTP_PORT} /${ftplocn} /"
1626+ curl ${_NOMETER} $FTPS_OPTIONS " ${_CURL_SSL_REQD} " -u " ${ftpuser} :${ftppass} " --silent -Q " DELE /${ftplocn} /${token:? } " " ftp://${ftphost}${SFTP_PORT} /${ftplocn} /"
16271627 fi
16281628 else
16291629 rm -f " ${t_loc:? } /${token:? } "
@@ -3077,6 +3077,12 @@ if check_version "${_CURL_VERSION}" "7.67" ; then
30773077 _NOMETER=" --no-progress-meter"
30783078fi
30793079
3080+ if check_version " ${_CURL_VERSION} " " 7.20" ; then
3081+ _CURL_SSL_REQD=" --ssl-reqd"
3082+ else
3083+ _CURL_SSL_REQD=" --ftp-ssl-reqd"
3084+ fi
3085+
30803086# Make sure mktemp works before going too far
30813087MKDIR_TEST_FILE= " $( mktemp 2> /dev/null || mktemp -t getssl.XXXXXX) "
30823088if [ " $MKDIR_TEST_FILE " == " " ]; then
0 commit comments