On Sat, 2011-08-13 at 11:31 -0700, Brian Smith wrote:

> > The trickiest thing is that http connection needs to wait for the
> > handshake to be complete before writing any data into nss - indeed it
> > needs to know whether to send http or spdy syntax afterall. The trick
> > was that the nss state machine doesn't start the handshake (much less
> > complete it) without the write taking place. I added a harmless
> > asynchronous read request when this happens (because the recv also
> > kicks off the handshake) even though this is a write-before-read
> > protocol.
> 
> There is a function SSL_ForceHandshake that does this. I would avoid trying 
> to emulate it outside of libssl if possible, as there are a lot of 
> subtleties. See 
> https://bugzilla.mozilla.org/buglist.cgi?quicksearch=SSL_ForceHandshake for 
> examples.
> 

I went down that road. It blocked the thread when dealing with OSCP in a
way that send/recv did not.

Do you see a problem with initiating the recv() in order to activate the
handshake? It isn't a problem for the HTTP state machine.




_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to