Unverified Commit f0b4db1a authored by Johannes Schindelin's avatar Johannes Schindelin Committed by Daniel Stenberg
Browse files

vtls: move the SUPPORT_HTTPS_PROXY flag into the Curl_ssl struct



That will allow us to choose the SSL backend at runtime.

Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 937899a3
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -5082,13 +5082,14 @@ static CURLcode parse_proxy(struct Curl_easy *data,
  else
    proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */

#ifndef HTTPS_PROXY_SUPPORT
#ifdef USE_SSL
  if(!Curl_ssl->support_https_proxy)
#endif
    if(proxytype == CURLPROXY_HTTPS) {
    failf(data, "Unsupported proxy \'%s\'"
                ", libcurl is built without the HTTPS-proxy support.", proxy);
      failf(data, "Unsupported proxy \'%s\', libcurl is built without the "
                  "HTTPS-proxy support.", proxy);
      return CURLE_NOT_BUILT_IN;
    }
#endif

  sockstype = proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
              proxytype == CURLPROXY_SOCKS5 ||
+4 −3
Original line number Diff line number Diff line
@@ -323,9 +323,6 @@ static curl_version_info_data version_info = {
#endif
#if defined(USE_LIBPSL)
  | CURL_VERSION_PSL
#endif
#if defined(HTTPS_PROXY_SUPPORT)
  | CURL_VERSION_HTTPS_PROXY
#endif
  ,
  NULL, /* ssl_version */
@@ -355,6 +352,10 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
#ifdef USE_SSL
  Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer));
  version_info.ssl_version = ssl_buffer;
  if(Curl_ssl->support_https_proxy)
    version_info.features |= CURL_VERSION_HTTPS_PROXY;
  else
    version_info.features &= ~CURL_VERSION_HTTPS_PROXY;
#endif

#ifdef HAVE_LIBZ
+1 −0
Original line number Diff line number Diff line
@@ -709,6 +709,7 @@ const struct Curl_ssl Curl_ssl_axtls = {
  0, /* have_certinfo */
  0, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  Curl_axtls_init,                /* init */
  Curl_axtls_cleanup,             /* cleanup */
+1 −0
Original line number Diff line number Diff line
@@ -974,6 +974,7 @@ const struct Curl_ssl Curl_ssl_cyassl = {
  0, /* have_pinnedpubkey */
#endif
  1, /* have_ssl_ctx */
  0, /* support_https_proxy */

  Curl_cyassl_init,                /* init */
  Curl_none_cleanup,               /* cleanup */
+1 −0
Original line number Diff line number Diff line
@@ -2886,6 +2886,7 @@ const struct Curl_ssl Curl_ssl_darwinssl = {
  0, /* have_pinnedpubkey */
#endif /* DARWIN_SSL_PINNEDPUBKEY */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  Curl_none_init,                     /* init */
  Curl_none_cleanup,                  /* cleanup */
Loading