curl / Mailing Lists / curl-library / Single Mail


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

From: Kamil Dudka via curl-library <>
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:
> ... 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:

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

Received on 2017-06-19