mirror of
https://github.com/curl/curl.git
synced 2025-09-14 08:02:44 +03:00
vtls: remove the Curl_cft_ssl_proxy object if CURL_DISABLE_PROXY
Closes #12459
This commit is contained in:
parent
7309b9cbbf
commit
4dbc7acc19
|
@ -157,8 +157,10 @@ static struct Curl_cftype *cf_types[] = {
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
&Curl_cft_ssl,
|
&Curl_cft_ssl,
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
&Curl_cft_ssl_proxy,
|
&Curl_cft_ssl_proxy,
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if !defined(CURL_DISABLE_PROXY)
|
#if !defined(CURL_DISABLE_PROXY)
|
||||||
#if !defined(CURL_DISABLE_HTTP)
|
#if !defined(CURL_DISABLE_HTTP)
|
||||||
&Curl_cft_h1_proxy,
|
&Curl_cft_h1_proxy,
|
||||||
|
|
|
@ -1846,6 +1846,8 @@ struct Curl_cftype Curl_cft_ssl = {
|
||||||
ssl_cf_query,
|
ssl_cf_query,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
|
|
||||||
struct Curl_cftype Curl_cft_ssl_proxy = {
|
struct Curl_cftype Curl_cft_ssl_proxy = {
|
||||||
"SSL-PROXY",
|
"SSL-PROXY",
|
||||||
CF_TYPE_SSL,
|
CF_TYPE_SSL,
|
||||||
|
@ -1864,6 +1866,8 @@ struct Curl_cftype Curl_cft_ssl_proxy = {
|
||||||
Curl_cf_def_query,
|
Curl_cf_def_query,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /* !CURL_DISABLE_PROXY */
|
||||||
|
|
||||||
static CURLcode cf_ssl_create(struct Curl_cfilter **pcf,
|
static CURLcode cf_ssl_create(struct Curl_cfilter **pcf,
|
||||||
struct Curl_easy *data,
|
struct Curl_easy *data,
|
||||||
struct connectdata *conn)
|
struct connectdata *conn)
|
||||||
|
@ -1971,8 +1975,12 @@ bool Curl_ssl_supports(struct Curl_easy *data, int option)
|
||||||
static struct Curl_cfilter *get_ssl_filter(struct Curl_cfilter *cf)
|
static struct Curl_cfilter *get_ssl_filter(struct Curl_cfilter *cf)
|
||||||
{
|
{
|
||||||
for(; cf; cf = cf->next) {
|
for(; cf; cf = cf->next) {
|
||||||
if(cf->cft == &Curl_cft_ssl || cf->cft == &Curl_cft_ssl_proxy)
|
if(cf->cft == &Curl_cft_ssl)
|
||||||
return cf;
|
return cf;
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
|
if(cf->cft == &Curl_cft_ssl_proxy)
|
||||||
|
return cf;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2018,7 +2026,12 @@ CURLcode Curl_ssl_cfilter_remove(struct Curl_easy *data,
|
||||||
|
|
||||||
bool Curl_ssl_cf_is_proxy(struct Curl_cfilter *cf)
|
bool Curl_ssl_cf_is_proxy(struct Curl_cfilter *cf)
|
||||||
{
|
{
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
return (cf->cft == &Curl_cft_ssl_proxy);
|
return (cf->cft == &Curl_cft_ssl_proxy);
|
||||||
|
#else
|
||||||
|
(void)cf;
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ssl_config_data *
|
struct ssl_config_data *
|
||||||
|
|
|
@ -228,7 +228,9 @@ struct ssl_primary_config *
|
||||||
Curl_ssl_cf_get_primary_config(struct Curl_cfilter *cf);
|
Curl_ssl_cf_get_primary_config(struct Curl_cfilter *cf);
|
||||||
|
|
||||||
extern struct Curl_cftype Curl_cft_ssl;
|
extern struct Curl_cftype Curl_cft_ssl;
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
extern struct Curl_cftype Curl_cft_ssl_proxy;
|
extern struct Curl_cftype Curl_cft_ssl_proxy;
|
||||||
|
#endif
|
||||||
|
|
||||||
#else /* if not USE_SSL */
|
#else /* if not USE_SSL */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user