summaryrefslogtreecommitdiffstats
path: root/lib/vtls/bearssl.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2020-08-19 07:37:28 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-19 16:44:30 (GMT)
commit7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04 (patch)
tree936c40c921e79b8eabd623181d78167188bbc810 /lib/vtls/bearssl.c
parent4446fda8e019a0138bec1aa2d83a720d63019ff9 (diff)
downloadCMake-7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04.zip
CMake-7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04.tar.gz
CMake-7ceb56989f8ab3a4e1b1f2c48c9a0f382b85ec04.tar.bz2
curl 2020-08-19 (9d954e49)
Code extracted from: https://github.com/curl/curl.git at commit 9d954e49bce3706a9a2efb119ecd05767f0f2a9e (curl-7_72_0).
Diffstat (limited to 'lib/vtls/bearssl.c')
-rw-r--r--lib/vtls/bearssl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/vtls/bearssl.c b/lib/vtls/bearssl.c
index 628e16a..44e7406 100644
--- a/lib/vtls/bearssl.c
+++ b/lib/vtls/bearssl.c
@@ -300,8 +300,12 @@ static CURLcode bearssl_connect_step1(struct connectdata *conn, int sockindex)
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
struct ssl_backend_data *backend = connssl->backend;
const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile);
+#ifndef CURL_DISABLE_PROXY
const char *hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
conn->host.name;
+#else
+ const char *hostname = conn->host.name;
+#endif
const bool verifypeer = SSL_CONN_CONFIG(verifypeer);
const bool verifyhost = SSL_CONN_CONFIG(verifyhost);
CURLcode ret;
@@ -386,8 +390,11 @@ static CURLcode bearssl_connect_step1(struct connectdata *conn, int sockindex)
*/
#ifdef USE_NGHTTP2
- if(data->set.httpversion >= CURL_HTTP_VERSION_2 &&
- (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2
+#ifndef CURL_DISABLE_PROXY
+ && (!SSL_IS_PROXY() || !conn->bits.tunnel_proxy)
+#endif
+ ) {
backend->protocols[cur++] = NGHTTP2_PROTO_VERSION_ID;
infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
}