curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Questions regarding curl_easy with SSL and multi threaded

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 24 Mar 2017 16:03:38 +0100 (CET)

On Wed, 15 Mar 2017, Volker Schmid wrote:

>> Only a subset of the TLS backends require mutex callbacks set. libcurl
>> built with schannel for example doesn't need any.
>
> Is there an easy way to find out during runtime? curl_easy_getinfo() or
> maybe curl_version()?

curl_version_info() returns a filled in struct that among other things
contains 'ssl_version' but that's a "human readable" string with information
about the SSL library in use.

Better then is probably yto call curl_easy_info(handle, CURLINFO_TLS_SSL_PTR,
...) which returns a pointer to a struct that has a member called 'backend'
which contains one if the CURLSSLBACKEND_* numbers from curl/curl.h.

> I need to know if I'm currently using a libcurl version which is using
> OpenSSL or not to know if I have to use the mutex-thing or not.

Yeah, its a bit unfortunate and cumbersome. It would be useful to get that
mutex logic provided by libcurl itself - at least when the application is fine
with it.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-24