ssl_ResetSecurityInfo(&ss->sec);
ssl_ResetSecurityInfo(&ss->sec, PR_TRUE);
SSL_ResetHandshake(PRFileDesc *s, PRBool asServer){    sslSocket *ss;    SECStatus status;    PRNetAddr addr;    ss = ssl_FindSocket(s);    if (!ss) {	SSL_DBG(("%d: SSL[%d]: bad socket in ResetHandshake", SSL_GETPID(), s));	return SECFailure;    }    /* Don't waste my time */    if (!ss->useSecurity)	return SECSuccess;    SSL_LOCK_READER(ss);    SSL_LOCK_WRITER(ss);    /* Reset handshake state */    ssl_Get1stHandshakeLock(ss);    ssl_GetSSL3HandshakeLock(ss);    ss->firstHsDone = PR_FALSE;    if ( asServer ) {	ss->handshake = ssl2_BeginServerHandshake;	ss->handshaking = sslHandshakingAsServer;    } else {	ss->handshake = ssl2_BeginClientHandshake;	ss->handshaking = sslHandshakingAsClient;    }    ss->nextHandshake       = 0;    ss->securityHandshake   = 0;    ssl_GetRecvBufLock(ss);    status = ssl_InitGather(&ss->gs);    ssl_ReleaseRecvBufLock(ss);    /*    ** Blow away old security state and get a fresh setup.    */    ssl_GetXmitBufLock(ss);     ssl_ResetSecurityInfo(&ss->sec);    status = ssl_CreateSecurityInfo(ss);    ssl_ReleaseXmitBufLock(ss);     ssl_ReleaseSSL3HandshakeLock(ss);    ssl_Release1stHandshakeLock(ss);    if (!ss->TCPconnected)	ss->TCPconnected = (PR_SUCCESS == ssl_DefGetpeername(ss, &addr));    SSL_UNLOCK_WRITER(ss);    SSL_UNLOCK_READER(ss);    return status;}