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 14:40:39 +0100

pt., 19 lut 2021 o 13:54 Daniel Stenberg <daniel_at_haxx.se> napisał(a):

> First, they're not "encryption libraries", they're TLS libraries. They do
> much
> more than just encryption.

Yes, I mean TLS libraries. Sorry for this inaccuracy.

Then: this looks like an area for improvement in the mbedTLS backend as I
> don't think there's any good reason for this struct to be this big.

I also think the mbedtls team can come up with a better solution.

If you roll up your sleeves and get to work I expect it could be taken down
> significantly.
>
Then I suggest making the amount of allocated memory dependent on the
CURL_DISABLE_PROXY flag. I'm just not sure if this would be correct:

#if defined(USE_SSL) && !defined(CURL_DISABLE_PROXY)
#define TLS_BACKEND_ALLOC_CNT 4
#else
#define TLS_BACKEND_ALLOC_CNT 2
#end
...
char *ssl = calloc( TLS_BACKEND_ALLOC_CNT, sslsize);

What do you think about it?


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-02-19