Re: Forcing the SSL handshake

2006-11-03 Thread Nelson Bolyard
Wan-Teh Chang wrote: > 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 SS

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 doi

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); do

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 pro

Re: Forcing the SSL handshake

2006-11-03 Thread Nelson B
I wrote: > Don't make timeouts occur. You have to wait until the handshake is done > anyway. You should only use timeout to detect that too much total time > has elapsed. Set the socket's timeout to the upper bound of that time limit. Let me say that another way. Write your code so that NO tim

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-

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

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); do

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 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 { >

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); PR_Rec