mirror of
https://github.com/curl/curl.git
synced 2026-08-24 17:23:33 +03:00
TLS: drop support for TLS-SRP
The options will simply do nothing. Closes #21965
This commit is contained in:
parent
d169ad68fa
commit
69ac867f98
63 changed files with 133 additions and 932 deletions
|
|
@ -786,27 +786,6 @@ static CURLcode proxy_setopts(struct OperationConfig *config, CURL *curl)
|
|||
return result;
|
||||
}
|
||||
|
||||
static CURLcode tls_srp_setopts(struct OperationConfig *config, CURL *curl)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
if(config->tls_username)
|
||||
MY_SETOPT_STR(curl, CURLOPT_TLSAUTH_USERNAME, config->tls_username);
|
||||
if(config->tls_password)
|
||||
MY_SETOPT_STR(curl, CURLOPT_TLSAUTH_PASSWORD, config->tls_password);
|
||||
if(config->tls_authtype)
|
||||
MY_SETOPT_STR(curl, CURLOPT_TLSAUTH_TYPE, config->tls_authtype);
|
||||
if(config->proxy_tls_username)
|
||||
MY_SETOPT_STR(curl, CURLOPT_PROXY_TLSAUTH_USERNAME,
|
||||
config->proxy_tls_username);
|
||||
if(config->proxy_tls_password)
|
||||
MY_SETOPT_STR(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD,
|
||||
config->proxy_tls_password);
|
||||
if(config->proxy_tls_authtype)
|
||||
MY_SETOPT_STR(curl, CURLOPT_PROXY_TLSAUTH_TYPE,
|
||||
config->proxy_tls_authtype);
|
||||
return result;
|
||||
}
|
||||
|
||||
static CURLcode setopt_post(struct OperationConfig *config, CURL *curl)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
|
|
@ -982,12 +961,6 @@ static CURLcode protocol_setopts(struct OperationConfig *config,
|
|||
#endif
|
||||
}
|
||||
|
||||
if(feature_tls_srp) {
|
||||
result = tls_srp_setopts(config, curl);
|
||||
if(setopt_bad(result))
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1071,6 +1044,16 @@ static CURLcode misc_setopts(struct OperationConfig *config, CURL *curl)
|
|||
if(config->proto_redir_present)
|
||||
MY_SETOPT_STR(curl, CURLOPT_REDIR_PROTOCOLS_STR, config->proto_redir_str);
|
||||
|
||||
my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
|
||||
my_setopt_slist(curl, CURLOPT_CONNECT_TO, config->connect_to);
|
||||
|
||||
if(config->gssapi_delegation)
|
||||
my_setopt_long(curl, CURLOPT_GSSAPI_DELEGATION, config->gssapi_delegation);
|
||||
|
||||
MY_SETOPT_STR(curl, CURLOPT_MAIL_AUTH, config->mail_auth);
|
||||
MY_SETOPT_STR(curl, CURLOPT_SASL_AUTHZID, config->sasl_authzid);
|
||||
my_setopt_long(curl, CURLOPT_SASL_IR, config->sasl_ir);
|
||||
|
||||
if(config->unix_socket_path) {
|
||||
if(config->abstract_unix_socket)
|
||||
MY_SETOPT_STR(curl, CURLOPT_ABSTRACT_UNIX_SOCKET,
|
||||
|
|
|
|||
|
|
@ -81,12 +81,6 @@ static void free_config_fields(struct OperationConfig *config)
|
|||
curlx_safefree(config->range);
|
||||
|
||||
curlx_safefree(config->userpwd);
|
||||
curlx_safefree(config->tls_username);
|
||||
curlx_safefree(config->tls_password);
|
||||
curlx_safefree(config->tls_authtype);
|
||||
curlx_safefree(config->proxy_tls_username);
|
||||
curlx_safefree(config->proxy_tls_password);
|
||||
curlx_safefree(config->proxy_tls_authtype);
|
||||
curlx_safefree(config->proxyuserpwd);
|
||||
curlx_safefree(config->proxy);
|
||||
|
||||
|
|
|
|||
|
|
@ -77,12 +77,6 @@ struct OperationConfig {
|
|||
char *dns_ipv6_addr; /* dot notation */
|
||||
char *userpwd;
|
||||
char *login_options;
|
||||
char *tls_username;
|
||||
char *tls_password;
|
||||
char *tls_authtype;
|
||||
char *proxy_tls_username;
|
||||
char *proxy_tls_password;
|
||||
char *proxy_tls_authtype;
|
||||
char *proxyuserpwd;
|
||||
char *proxy;
|
||||
char *noproxy;
|
||||
|
|
|
|||
|
|
@ -264,9 +264,11 @@ static const struct LongShort aliases[] = {
|
|||
{"proxy-ssl-auto-client-cert", ARG_BOOL|ARG_TLS, ' ',
|
||||
C_PROXY_SSL_AUTO_CLIENT_CERT},
|
||||
{"proxy-tls13-ciphers", ARG_STRG|ARG_TLS, ' ', C_PROXY_TLS13_CIPHERS},
|
||||
{"proxy-tlsauthtype", ARG_STRG|ARG_TLS, ' ', C_PROXY_TLSAUTHTYPE},
|
||||
{"proxy-tlspassword", ARG_STRG|ARG_TLS|ARG_CLEAR, ' ', C_PROXY_TLSPASSWORD},
|
||||
{"proxy-tlsuser", ARG_STRG|ARG_TLS|ARG_CLEAR, ' ', C_PROXY_TLSUSER},
|
||||
{"proxy-tlsauthtype", ARG_STRG|ARG_TLS|ARG_DEPR, ' ', C_PROXY_TLSAUTHTYPE},
|
||||
{"proxy-tlspassword", ARG_STRG|ARG_TLS|ARG_CLEAR|ARG_DEPR, ' ',
|
||||
C_PROXY_TLSPASSWORD},
|
||||
{"proxy-tlsuser", ARG_STRG|ARG_TLS|ARG_CLEAR|ARG_DEPR, ' ',
|
||||
C_PROXY_TLSUSER},
|
||||
{"proxy-tlsv1", ARG_NONE|ARG_TLS, ' ', C_PROXY_TLSV1},
|
||||
{"proxy-user", ARG_STRG|ARG_CLEAR, 'U', C_PROXY_USER},
|
||||
{"proxy1.0", ARG_STRG, ' ', C_PROXY1_0},
|
||||
|
|
@ -338,9 +340,9 @@ static const struct LongShort aliases[] = {
|
|||
{"tls-earlydata", ARG_BOOL|ARG_TLS, ' ', C_TLS_EARLYDATA},
|
||||
{"tls-max", ARG_STRG|ARG_TLS, ' ', C_TLS_MAX},
|
||||
{"tls13-ciphers", ARG_STRG|ARG_TLS, ' ', C_TLS13_CIPHERS},
|
||||
{"tlsauthtype", ARG_STRG|ARG_TLS, ' ', C_TLSAUTHTYPE},
|
||||
{"tlspassword", ARG_STRG|ARG_TLS|ARG_CLEAR, ' ', C_TLSPASSWORD},
|
||||
{"tlsuser", ARG_STRG|ARG_TLS|ARG_CLEAR, ' ', C_TLSUSER},
|
||||
{"tlsauthtype", ARG_STRG|ARG_TLS|ARG_DEPR, ' ', C_TLSAUTHTYPE},
|
||||
{"tlspassword", ARG_STRG|ARG_TLS|ARG_CLEAR|ARG_DEPR, ' ', C_TLSPASSWORD},
|
||||
{"tlsuser", ARG_STRG|ARG_TLS|ARG_CLEAR|ARG_DEPR, ' ', C_TLSUSER},
|
||||
{"tlsv1", ARG_NONE|ARG_TLS, '1', C_TLSV1},
|
||||
{"tlsv1.0", ARG_NONE|ARG_TLS, ' ', C_TLSV1_0},
|
||||
{"tlsv1.1", ARG_NONE|ARG_TLS, ' ', C_TLSV1_1},
|
||||
|
|
@ -2787,55 +2789,12 @@ static ParameterError opt_string(struct OperationConfig *config,
|
|||
case C_HOSTPUBSHA256: /* --hostpubsha256 */
|
||||
err = getstr(&config->hostpubsha256, nextarg, DENY_BLANK);
|
||||
break;
|
||||
case C_TLSUSER: /* --tlsuser */
|
||||
if(!feature_tls_srp)
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
else
|
||||
err = getstr(&config->tls_username, nextarg, DENY_BLANK);
|
||||
break;
|
||||
case C_TLSPASSWORD: /* --tlspassword */
|
||||
if(!feature_tls_srp)
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
else
|
||||
err = getstr(&config->tls_password, nextarg, ALLOW_BLANK);
|
||||
break;
|
||||
case C_TLSAUTHTYPE: /* --tlsauthtype */
|
||||
if(!feature_tls_srp)
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
else {
|
||||
err = getstr(&config->tls_authtype, nextarg, DENY_BLANK);
|
||||
if(!err && config->tls_authtype && strcmp(config->tls_authtype, "SRP"))
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT; /* only support TLS-SRP */
|
||||
}
|
||||
break;
|
||||
case C_PINNEDPUBKEY: /* --pinnedpubkey */
|
||||
err = getstr(&config->pinnedpubkey, nextarg, DENY_BLANK);
|
||||
break;
|
||||
case C_PROXY_PINNEDPUBKEY: /* --proxy-pinnedpubkey */
|
||||
err = getstr(&config->proxy_pinnedpubkey, nextarg, DENY_BLANK);
|
||||
break;
|
||||
case C_PROXY_TLSUSER: /* --proxy-tlsuser */
|
||||
if(!feature_tls_srp)
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
else
|
||||
err = getstr(&config->proxy_tls_username, nextarg, ALLOW_BLANK);
|
||||
break;
|
||||
case C_PROXY_TLSPASSWORD: /* --proxy-tlspassword */
|
||||
if(!feature_tls_srp)
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
else
|
||||
err = getstr(&config->proxy_tls_password, nextarg, DENY_BLANK);
|
||||
break;
|
||||
case C_PROXY_TLSAUTHTYPE: /* --proxy-tlsauthtype */
|
||||
if(!feature_tls_srp)
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
else {
|
||||
err = getstr(&config->proxy_tls_authtype, nextarg, DENY_BLANK);
|
||||
if(!err && config->proxy_tls_authtype &&
|
||||
strcmp(config->proxy_tls_authtype, "SRP"))
|
||||
err = PARAM_LIBCURL_DOESNT_SUPPORT; /* only support TLS-SRP */
|
||||
}
|
||||
break;
|
||||
case C_PROXY_CERT_TYPE: /* --proxy-cert-type */
|
||||
err = getstr(&config->proxy_cert_type, nextarg, DENY_BLANK);
|
||||
break;
|
||||
|
|
@ -3069,6 +3028,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
*usedarg = consumearg; /* mark it as used */
|
||||
}
|
||||
if(a->desc & ARG_DEPR) {
|
||||
if(a->desc & ARG_CLEAR)
|
||||
cleanarg(CURL_UNCONST(nextarg));
|
||||
opt_depr(a);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ bool feature_ntlm = FALSE;
|
|||
bool feature_ntlm_wb = FALSE;
|
||||
bool feature_spnego = FALSE;
|
||||
bool feature_ssl = FALSE;
|
||||
bool feature_tls_srp = FALSE;
|
||||
bool feature_zstd = FALSE;
|
||||
bool feature_ech = FALSE;
|
||||
bool feature_ssls_export = FALSE;
|
||||
|
|
@ -112,7 +111,6 @@ static struct feature_name_presentp {
|
|||
{ "SSPI", NULL, CURL_VERSION_SSPI },
|
||||
{ "SSLS-EXPORT", &feature_ssls_export, 0 },
|
||||
{ "threadsafe", NULL, CURL_VERSION_THREADSAFE },
|
||||
{ "TLS-SRP", &feature_tls_srp, CURL_VERSION_TLSAUTH_SRP },
|
||||
{ "Unicode", NULL, CURL_VERSION_UNICODE },
|
||||
{ "UnixSockets", NULL, CURL_VERSION_UNIX_SOCKETS },
|
||||
{ "zstd", &feature_zstd, CURL_VERSION_ZSTD },
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ extern bool feature_ntlm;
|
|||
extern bool feature_ntlm_wb;
|
||||
extern bool feature_spnego;
|
||||
extern bool feature_ssl;
|
||||
extern bool feature_tls_srp;
|
||||
extern bool feature_zstd;
|
||||
extern bool feature_ech;
|
||||
extern bool feature_ssls_export;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue