[gnutls-dev] Re: OpenCDK indexing fails if a public key is at offset 0

Simon Josefsson jas at extundo.com
Mon Sep 25 13:05:48 CEST 2006


"Adam Langley" <agl at imperialviolet.org> writes:

> On 9/18/06, Simon Josefsson <jas at extundo.com> wrote:
>> Makes sense to me.  I believe I have fixed this in gnutls CVS trunk,
>> please check.
>
> Looks good.

Great.

> This is probably a silly question, but I can't split the read and
> write paths of a single session across several threads, can I? (e.g.
> one thread which only calls record_send and other which only calls
> record_recv). I'm fairly certain I can't, but I'm just checking
> because it has such a large effect on the code.

It isn't obvious that this wouldn't work.  Looking at the code,
receiving and sending are pretty separated.  One concern I had would
be if receiving something (e.g., an alert, change cipher suite,
re-handshake request) could trigger additional alerts or other packets
that would be sent by the library automatically, but I can't find any
such examples.

Tracing all functions used by gnutls_record_send and
gnutls_record_recv, and checking if they use the same variables
somewhere, would answer this.  But even so, it isn't certain that
future versions will look the same.

Of course, you could still design things that way, and put a mutex
around the gnutls_record_send and gnutls_record_recv calls to be sure.
You could also disable the mutex during debugging, to see if something
actually breaks...

Sorry that this isn't exactly a clear answer.

/Simon



More information about the Gnutls-dev mailing list