gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thread safety in gnutls [was: Re: Handshake and verification]


From: Daniel Kahn Gillmor
Subject: thread safety in gnutls [was: Re: Handshake and verification]
Date: Wed, 09 Dec 2009 09:51:44 -0500
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)

Hi Laurence--

On 12/09/2009 09:06 AM, address@hidden wrote:
> I've been working on my client-server pair with X.509 authentication,
> using the code from the examples in the manuals.  I've put the code for
> handling the connections into a (POSIX) thread function, i.e., one passed
> to `pthread_create'.  In order to test this, I've made it possible to call
> the client with a `--sleep' argument to put it to sleep for a few seconds.
>  I call it several times and put it into the background, so several
> clients can be running and connected to the server at the same time.
> 
> I got this error:
> 
> optdbsrv: ath.c:186: _gcry_ath_mutex_lock: Assertion `*lock ==
> ((ath_mutex_t) 0)' failed.
> Aborted
> 
> I was able to fix it by locking and unlocking a mutex before and after the
> call to `gnutls_handshake'.

are you initializing gcrypt itself to be threadsafe in your
multithreaded program?

http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html

        --dkg

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]