gnutls-devel
[Top][All Lists]
Advanced

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

Re: [gnutls-dev] [Help-gnutls] push/pull functions


From: Nikos Mavrogiannopoulos
Subject: Re: [gnutls-dev] [Help-gnutls] push/pull functions
Date: Wed, 26 Sep 2007 10:56:18 +0300
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

On Wednesday 26 September 2007, Robin Redeker wrote:
> Hi!

> I have a (maybe not so?) simple question:
> Can I call gnutls_record_recv/gnutls_record_send safely while I'm in a
> push/pull callback?

As long as you don't use the same session, it should be safe.

> The reason I'm asking is that I want to make bindings for GNU Smalltalk,
> which has support for non-preemtive multiple threads of execution.

gnutls can be used with multiple threads, as long as the gcrypt callbacks are 
set and the same session is not accessed by multiple threads.

> What if some kind of re-handshake happens while I call
> gnutls_record_recv? Will GnuTLS detect that it is still waiting for the
> callback to read to return?

A rehandshake will be detected by the return value of gnutls_record_recv(). It 
is in-band data so it should procceed normally.

> And there is also another issue I stepped over while testing. I somehow
> could't get the anonymous client example to work with gnutls-serv.
> I've tried running the server with:
>    gnutls-serv -p 12331 --kx "Anon DH"
>    gnutls-serv -p 12331 --kx "Anon DH" -g
>    gnutls-serv -p 12331 --kx "Anon DH" --dhparams /tmp/dh.pem (with a
>    properly initialized dh.pem)

Thank you for reporting this. It seems that it was a bug in the handshake 
function and couldn't negotiate anonymous DH if a certificate wasn't set. It 
must be corrected in the git repository (and attached patch).


regards,
Nikos

Attachment: patch.txt
Description: Text document


reply via email to

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