Ok agreed. However in my case, I don't expect the handshake to be redone (or restarted) . My NSS-enabled apps connect, exchange data, and then disconnect. There's no multiple connections, just one. Unless the underlying SSL implementation redoes the handshake, doing the cert checks once at the beginning of the handshake should be OK.
What callbacks you're referring to when you talk about callback functions registered with libssl? What header file are they defined in? -- P "Nelson B. Bolyard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Patrick wrote: > > > To pick up where we left off with use of SSL_ForceHandshake in my NSS > > apps: > > I make a call to it before I do any kind of data transfers. That way I > > force the authentication to happen, and can do extra checking on > > certificate validity, outside of standard NSS checks, things like a > > custom CRL checking. > > The ability to do the extra checking need not be coupled to the call to > SSL_ForceHandshake. You can do the extra checks whether you call > SSL_ForceHandshake or not. The extra checks should be occurring at the > appropriate places during the handshake, via callback functions registered > with libssl. Assuming you've done that, the extra checks will happen > whenever the handshake occurs, regardless of why it occurs, and regardless > of the number of handshakes that occur. > > > You indicated last that you disfavored this use of > > SSL_ForceHandshake, and thought cert exchange should happen on first > > exchange of data. However in my case, network connections will be > > between NSS apps that I control. > > You hope. An attacker might (probably would) not use your software. > > > I don't see how doing the > > SSL_ForceHandshake could lead to secnarios where connections will fail > > (assuming both parties always have encryption ciphers in common). > > My point was this: > > In the SSL protocol, either party to the connection can initiate a new > handshake at any time during the connection, except while a connection is > already in progress. NSS's libssl will conduct the handshake whenever it > is requested to do so, either by the local application or by the peer. > It is not true that the only time a handshake can occur is when you call > SSL_ForceHandshake. Each time a "full" (e.g. RSA) handshake (as opposed > to a "restart" handshake) is done, the authentication done in any previous > handshakes is no longer valid. So, when you've received some kind of > request, and need to make a authorization decision, the question to ask > should be "what was the authenticated identity in use at the time that > the request was received?" The answer to that question may not be the > same as the answer to the question "what identity was authenticated in > the first handshake to occur on this connection?" > > -- > Nelson Bolyard > Disclaimer: I speak for myself, not for Netscape
