mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
mbedtls: fix build with disabled proxy support
Don't reference fields that do not exist. Fixes build failure: vtls/mbedtls.c: In function 'mbed_connect_step1': vtls/mbedtls.c:249:54: error: 'struct connectdata' has no member named 'http_proxy' Closes #5615
This commit is contained in:
parent
7de2a4ce35
commit
989e6dffc5
@ -246,9 +246,14 @@ mbed_connect_step1(struct connectdata *conn,
|
|||||||
const char * const ssl_capath = SSL_CONN_CONFIG(CApath);
|
const char * const ssl_capath = SSL_CONN_CONFIG(CApath);
|
||||||
char * const ssl_cert = SSL_SET_OPTION(cert);
|
char * const ssl_cert = SSL_SET_OPTION(cert);
|
||||||
const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile);
|
const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile);
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||||
conn->host.name;
|
conn->host.name;
|
||||||
const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
|
const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
|
||||||
|
#else
|
||||||
|
const char * const hostname = conn->host.name;
|
||||||
|
const long int port = conn->remote_port;
|
||||||
|
#endif
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
char errorbuf[128];
|
char errorbuf[128];
|
||||||
errorbuf[0] = 0;
|
errorbuf[0] = 0;
|
||||||
@ -538,9 +543,14 @@ mbed_connect_step2(struct connectdata *conn,
|
|||||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||||
struct ssl_backend_data *backend = connssl->backend;
|
struct ssl_backend_data *backend = connssl->backend;
|
||||||
const mbedtls_x509_crt *peercert;
|
const mbedtls_x509_crt *peercert;
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
const char * const pinnedpubkey = SSL_IS_PROXY() ?
|
const char * const pinnedpubkey = SSL_IS_PROXY() ?
|
||||||
data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
|
data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
|
||||||
data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
|
data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
|
||||||
|
#else
|
||||||
|
const char * const pinnedpubkey =
|
||||||
|
data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
|
||||||
|
#endif
|
||||||
|
|
||||||
conn->recv[sockindex] = mbed_recv;
|
conn->recv[sockindex] = mbed_recv;
|
||||||
conn->send[sockindex] = mbed_send;
|
conn->send[sockindex] = mbed_send;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user