thread safety in gnutls [was: Re: Handshake and verification]
lfinsto at gwdg.de
lfinsto at gwdg.de
Wed Dec 9 16:29:58 CET 2009
On Wed, December 9, 2009 3:51 pm, Daniel Kahn Gillmor wrote:
> On 12/09/2009 09:06 AM, lfinsto at gwdg.de wrote:
[...]
>> I got this error:
>>
>> optdbsrv: ath.c:186: _gcry_ath_mutex_lock: Assertion `*lock ==
>> ((ath_mutex_t) 0)' failed.
>> Aborted
[...]
> 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
No, I had actually read this, but forgotten about it. However, when I
tried it, i.e.,
#include <gnutls.h>
#include <gcrypt.h>
#include <errno.h>
#include <pthread.h>
GCRY_THREAD_OPTION_PTHREAD_IMPL;
int main()
{
/* The order matters. */
gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
gnutls_global_init();
}
I got this error from the call to `generate_rsa_params':
Ohhhh jeeee: operation is not possible without initialized secure memory
Aborted
I'll have to take a closer look at the documentation, and also get the
documentation to `libcrypt', since I don't know what this is about.
Thanks,
Laurence
-------------------------------------------------------------
Laurence Finston
Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH
Am Fassberg 11
37077 Goettingen
Telefon: +49 551 201-1882
E-Mail: lfinsto at gwdg.de
More information about the Gnutls-devel
mailing list