NSS non-blocking mode and long computations

2009-10-22 Thread Ambroz Bizjak
Hi, I'm using NSS in non-blocking mode. To perform a handshake on a SSL socket, I use SSL_ForceHandshake (if it returns PR_WOULD_BLOCK_ERROR I retry when the SSL socket becomes readable). It works, but I've noticed that SSL_ForceHandshake sometimes takes a long time to return (around 100 ms). I

Re: How to log out of SDR?

2009-10-22 Thread Neil
Neil wrote: Neil wrote: I also notice that checkPassword(); logs out if there was a password. Can this behaviour be relied on, or should I call logoutSimple() too? To answer my own question, nsPK11Token::CheckPassword calls PK11_CheckUserPassword which is documented as logging out if the

Re: NSS non-blocking mode and long computations

2009-10-22 Thread Nelson B Bolyard
On 2009-10-22 05:50 PDT, Ambroz Bizjak wrote: Hi, I'm using NSS in non-blocking mode. To perform a handshake on a SSL socket, I use SSL_ForceHandshake (if it returns PR_WOULD_BLOCK_ERROR I retry when the SSL socket becomes readable). It works, but I've noticed that SSL_ForceHandshake

Re: NSS non-blocking mode and long computations

2009-10-22 Thread Ambroz Bizjak
On Oct 22, 7:22 pm, Nelson B Bolyard nel...@bolyard.me wrote: What kind of system? What CPU? What clock speed? What memory speed? Are you doing client authentication with a client certificate? Are you using Diffie-Hellman Ephemeral cipher suites? 100ms is indeed a long time if you're not.