curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL error when using libcurl with fork in child and parent

From: Kamil Dudka via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 19 Jun 2017 16:08:37 +0200

On Friday, June 16, 2017 10:13:03 Daniel Stenberg wrote:
> On Thu, 15 Jun 2017, joseph galois via curl-library wrote:
> > Then, the questions is: Is there a way to instruct libcurl so that I can
> > use it safely at both parent and children with nss?
>
> This seems to be an NSS problem and not strictly a libcurl problem. Googling
> for "nss fork child" shows many instances of this being a problem to
> people.
>
> I ended up on this NSS bug entry which I think is related, and mentions a
> fix in 3.28: https://bugzilla.mozilla.org/show_bug.cgi?id=1263017
>
> ... and since you showed you're using NSS 3.21.3, my guess is that you need
> to do a major version bump to get this situation improved. But I think the
> best way forward is to ask the question specificly to the NSS team as
> they're the ones who will know for sure.

As Daniel said, updating nss to 3.28+ might fix the problem. Alternatively,
you may try to backport the one-line fix for your version of nss:

https://hg.mozilla.org/projects/nss/rev/00ca1fbb8c5c

... or just make the code using libcurl call SECMOD_RestartModules() after
each fork().

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