curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Allocate ssl backend

From: Michał Antoniak via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 19 Feb 2021 11:23:49 +0100

 In our project we use the mbedtls library. After our optimizations, the
ssl_backend_data structure is 1828 bytes in size. Unfortunately, I don't
know about other encryption libraries.

czw., 18 lut 2021 o 10:59 Daniel Stenberg <daniel_at_haxx.se> napisał(a):

> 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
Received on 2021-02-19