thread safety in gnutls [was: Re: Handshake and verification]
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 15:51:44 CET 2009
Hi Laurence--
On 12/09/2009 09:06 AM, lfinsto at gwdg.de 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 891 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20091209/06cd3931/attachment.pgp>
More information about the Gnutls-devel
mailing list