PORT_Assert(ss->ssl3); PORT_Assert( ssl_HaveRecvBufLock(ss) ); PORT_Assert( ssl_HaveSSL3HandshakeLock(ss) );
PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) );
ssl3_HandleHelloRequest(sslSocket *ss){    sslSessionID *sid = ss->sec.ci.sid;    SECStatus     rv;    SSL_TRC(3, ("%d: SSL3[%d]: handle hello_request handshake",		SSL_GETPID(), ss->fd));    PORT_Assert(ss->ssl3);    PORT_Assert( ssl_HaveRecvBufLock(ss) );    PORT_Assert( ssl_HaveSSL3HandshakeLock(ss) );    if (ss->ssl3->hs.ws == wait_server_hello)	return SECSuccess;    if (ss->ssl3->hs.ws != idle_handshake || ss->sec.isServer) {	(void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);	PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST);	return SECFailure;    }    if (sid) {	ss->sec.uncache(sid);	ssl_FreeSID(sid);	ss->sec.ci.sid = NULL;    }    ssl_GetXmitBufLock(ss);    rv = ssl3_SendClientHello(ss);    ssl_ReleaseXmitBufLock(ss);    return rv;}