cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Openssl crashing when linked against curl(multithreaded setup) in AIX 64 bit platform

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 11 Feb 2014 11:53:27 +0100 (CET)

On Mon, 10 Feb 2014, Kamil Dudka wrote:

>> Define a new Curl_easy_setopt option
>
> Does it make sense to set the option per-handle if it acts globally?

No, it really doesn't! I would say that it should be a new bit in the
curl_global_init() flags. CURL_GLOBAL_SSLMUTEX perhaps.

>> called CURLOPT_OPENSSL_THREADSAFETY REGISTRATION.and curl API user to set
>> it to true or false depending on their requirement(by default it will be
>> false)
>
> Are we going to have also options CURLOPT_GNUTLS_THREADSAFETY, etc.?
> IMHO, the option name should not be specific to a particular SSL backend.

Agreed. An option like this must be SSL library agnostic or it will be
pointless. CURL_GLOBAL_SSLMUTEX should use the necesary mutex depending on
what needs to be done.

> We should also clearly document the meaning of such an option for SSL
> backends that are thread-safe without external locking (like NSS).

IMHO we document that bit to be used by anyone using libcurl+SSL in a
multihreaded way, as then it doesn't matter which particular SSL backend it
was built to use.

Then eventually we can probably make CURL_GLOBAL_DEFAULT include that bit in
the future if everything works out fine.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-11