[Top][All Lists]

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

gnutls_handshake() thread problem

From: Jay Anra
Subject: gnutls_handshake() thread problem
Date: Wed, 17 Nov 2010 08:54:54 +0000

On 21 Oct I reported a problem I was having with inconsistent errors that appeared to be connected with libgcrypt and asynchronous sockets.

It turns out the problem was not specifically libgcrypt but gnutls_handshake().

What was happening was that the socket interrupt was calling gnutls_handshake() with a response from the server, interrupting the previous call to gnutls_handshake() that had not yet returned. The interrupt call to gnutls_handshake() obviously conflicting with the previous incomplete call to gnutls_handshake() and causing all sorts of inconsistent errors.

I have used a mutex to protect gnutls_hansdshake() and the problems have gone away.

Would it be possible to build protection into the library for this?

reply via email to

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