PORT_Assert( ssl_HaveRecvBufLock(ss) ); PORT_Assert( ssl_Have1stHandshakeLock(ss) );
PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
ssl2_HandleV3HandshakeRecord(sslSocket *ss){    SECStatus           rv;    SSL3ProtocolVersion version = (ss->gs.hdr[1] << 8) | ss->gs.hdr[2];    PORT_Assert( ssl_HaveRecvBufLock(ss) );    PORT_Assert( ssl_Have1stHandshakeLock(ss) );    /* We've read in 3 bytes, there are 2 more to go in an ssl3 header. */    ss->gs.remainder         = 2;    ss->gs.count             = 0;    /* Clearing these handshake pointers ensures that      * ssl_Do1stHandshake won't call ssl2_HandleMessage when we return.     */    ss->nextHandshake     = 0;    ss->securityHandshake = 0;    /* Setting ss->version to an SSL 3.x value will cause     ** ssl_GatherRecord1stHandshake to invoke ssl3_GatherCompleteHandshake()     ** the next time it is called.    **/    rv = ssl3_NegotiateVersion(ss, version);    if (rv != SECSuccess) {	return rv;    }    ss->sec.send         = ssl3_SendApplicationData;    return SECSuccess;}