tool: warn when --ssl and --ftp-ssl-control override each other

and mention this properly in the docs.

Closes #21887
This commit is contained in:
Daniel Stenberg 2026-06-07 00:22:53 +02:00
parent c4c12843df
commit 7bb7b2c2a4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 12 additions and 0 deletions

View file

@ -1908,6 +1908,10 @@ static ParameterError opt_bool(struct OperationConfig *config,
if(config->ftp_ssl)
warnf("--%s is an insecure option, consider --ssl-reqd instead",
a->lname);
if(toggle && config->ftp_ssl_control) {
config->ftp_ssl_control = FALSE;
warnf("--%s overrides --ftp-ssl-control", a->lname);
}
break;
case C_FTP_SSL_CCC: /* --ftp-ssl-ccc */
config->ftp_ssl_ccc = toggle;
@ -1959,6 +1963,10 @@ static ParameterError opt_bool(struct OperationConfig *config,
break;
case C_FTP_SSL_CONTROL: /* --ftp-ssl-control */
config->ftp_ssl_control = toggle;
if(toggle && config->ftp_ssl) {
config->ftp_ssl = FALSE;
warnf("--%s overrides --ssl", a->lname);
}
break;
case C_RAW: /* --raw */
config->raw = toggle;