On Thu, Sep 18, 2008 at 2:36 PM, Wan-Teh Chang <[EMAIL PROTECTED]> wrote:
> Since we don't have access to the SSL state machine
> inside NSS's SSL library, we have to use PRFileDesc
> and PR_Recv and PR_Send, but we don't need to use
> PR_Poll.  We can call the 'poll' method of PRFileDesc
> directly to get the POLLIN/POLLOUT or EPOLLIN/EPOLLOUT
> flags we should use with the poll() or epoll() system
> call.
>
> This does require that SSLClientSocket be NOT layered
> on top of TCPClientSocket on Linux, because SSLClientSocket
> needs to use the underlying Unix fd (wrapped in a
> PRFileDesc) directly.

I bet you five bucks we can layer SSLClientSocket on top of
TCPClientSocket by creating a little nspr i/o layer that
talks to a memory buffer.  I did this with OpenSSL some time
ago, I figure I can do it with nss, too.

Plan: 1) stop reading mail and irc.  2) convert the nss demo app tstclnt.c to
handle multiple clients and turn it into a little version of strsclnt.c, but
using nonblocking io.  3) add the nspr i/o layer I mentioned, and
don't let nss or nspr see any real sockets ever; handle all i/o
to and from those buffers ourselves.  4) once that works, do the same
thing in SSLClientSocket.  5) Profit.
- Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to chromium-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to