Re: Forcing the SSL handshake

2006-11-03 Thread Nelson B
Rob Crittenden wrote: Nelson B wrote: Rob Crittenden wrote: In an SSL client I want to force the SSL handshake to take place instead of passively waiting for it to happen during the first write. Here are a few (?) questions and comments: 1. Is this a blocking socket, or non-blocking?

Re: Forcing the SSL handshake

2006-11-03 Thread Nelson B
Kyle Hamilton wrote: On 11/2/06, Rob Crittenden [EMAIL PROTECTED] wrote: It would be a whole lot simpler if I didn't want to force the handshake. Indeed, that is how I initially wrote it, but then I changed my mind and wrenched the code until it worked the way I wanted. The problem being,

Re: Forcing the SSL handshake

2006-11-03 Thread Rob Crittenden
Nelson B wrote: Rob Crittenden wrote: In an SSL client I want to force the SSL handshake to take place instead of passively waiting for it to happen during the first write. Right after I connect to the server I'm currently doing this: SSL_ResetHandshake(ssl, /* asServer */ PR_FALSE);

Re: Forcing the SSL handshake

2006-11-03 Thread Wan-Teh Chang
Rob Crittenden wrote: One change I've made from tstclnt is using PR_ConnectContinue() instead of PR_GetConnectStatus() which is deprecated. The socket is already connected by the time I start doing any NSS calls. I'm getting a connected socket and pushing SSL on top of that (rather than

Forcing the SSL handshake

2006-11-02 Thread Rob Crittenden
In an SSL client I want to force the SSL handshake to take place instead of passively waiting for it to happen during the first write. Right after I connect to the server I'm currently doing this: SSL_ResetHandshake(ssl, /* asServer */ PR_FALSE); do { SSL_ForceHandshake(ssl);

Re: Forcing the SSL handshake

2006-11-02 Thread Nelson B
Rob Crittenden wrote: In an SSL client I want to force the SSL handshake to take place instead of passively waiting for it to happen during the first write. Right after I connect to the server I'm currently doing this: SSL_ResetHandshake(ssl, /* asServer */ PR_FALSE); do {

Re: Forcing the SSL handshake

2006-11-02 Thread Rob Crittenden
Nelson B wrote: Rob Crittenden wrote: In an SSL client I want to force the SSL handshake to take place instead of passively waiting for it to happen during the first write. Right after I connect to the server I'm currently doing this: SSL_ResetHandshake(ssl, /* asServer */ PR_FALSE);

Re: Forcing the SSL handshake

2006-11-02 Thread Kyle Hamilton
On 11/2/06, Rob Crittenden [EMAIL PROTECTED] wrote: Nelson B wrote: 1. Is this a blocking socket, or non-blocking? non-blocking, not my choice. Interesting issue. 2. If non-blocking, are you certain that the connection has completed? That is, are you certain that the TCP's three phase