PORT_Assert( ssl_Have1stHandshakeLock(ss) );
PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) );
ssl2_SendServerFinishedMessage(sslSocket *ss){    sslSessionID *   sid;    PRUint8 *        msg;    int              sendLen, sent;    SECStatus        rv    = SECSuccess;    PORT_Assert( ssl_Have1stHandshakeLock(ss) );    ssl_GetXmitBufLock(ss);    /***************************************/    if (ss->sec.ci.sentFinished == 0) {	ss->sec.ci.sentFinished = 1;	PORT_Assert(ss->sec.ci.sid != 0);	sid = ss->sec.ci.sid;	SSL_TRC(3, ("%d: SSL[%d]: sending server-finished",		    SSL_GETPID(), ss->fd));	sendLen = 1 + sizeof(sid->u.ssl2.sessionID);	rv = ssl2_GetSendBuffer(ss, sendLen);	if (rv != SECSuccess) {	    goto done;	}	msg = ss->sec.ci.sendBuf.buf;	msg[0] = SSL_MT_SERVER_FINISHED;	PORT_Memcpy(msg+1, sid->u.ssl2.sessionID,		    sizeof(sid->u.ssl2.sessionID));	DUMP_MSG(29, (ss, msg, sendLen));	sent = (*ss->sec.send)(ss, msg, sendLen, 0);	if (sent < 0) {	    /* If send failed, it is now a bogus  session-id */	    (*ss->sec.uncache)(sid);	    rv = (SECStatus)sent;	} else if (!ss->noCache) {	    /* Put the sid in session-id cache, (may already be there) */	    (*ss->sec.cache)(sid);	    rv = SECSuccess;	}	ssl_FreeSID(sid);	ss->sec.ci.sid = 0;    }done:    ssl_ReleaseXmitBufLock(ss);    /***************************************/    return rv;}