On Thu, 18 Feb 2021, Michał Antoniak via curl-library wrote:
https://github.com/curl/curl/blob/e72270236cf7606069907f91e55e02c5ed54df4a/lib/url.c#L1640
Is it intended to allocate memory for ssl backend data 4 times?
Yes. libcurl might use two TLS connections for host and the logic is mostly
cloned for proxies so we have two for that as well, even if an optimization
could remove one of them for proxy.
With OpenSSL, that struct is 32 bytes big on an x86-64 arch so it's not like
we're wasting oceans of data there.
I briefly checked the code and it seems that gskit.c explicitly uses
proxy_ssl regardless of the CURL_DISABLE_PROXY flag. Is it intentional?
That probably just shows that nobody has built gskit with CURL_DISABLE_PROXY
or at least not bothered to trim down those things for proxy-less builds.
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html