isTLS = (PRBool)(ss->ssl3->pwSpec->version > SSL_LIBRARY_VERSION_3_0);
isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0);
sendRSAClientKeyExchange(sslSocket * ss, SECKEYPublicKey * svrPubKey){    PK11SymKey *	pms 		= NULL;    SECStatus           rv    		= SECFailure;    SECItem 		enc_pms 	= {siBuffer, NULL, 0};    PRBool              isTLS;    PORT_Assert( ssl_HaveSSL3HandshakeLock(ss) );    PORT_Assert( ssl_HaveXmitBufLock(ss));    /* Generate the pre-master secret ...  */    ssl_GetSpecWriteLock(ss);    isTLS = (PRBool)(ss->ssl3->pwSpec->version > SSL_LIBRARY_VERSION_3_0);    pms = ssl3_GenerateRSAPMS(ss, ss->ssl3->pwSpec, NULL);    ssl_ReleaseSpecWriteLock(ss);    if (pms == NULL) {	ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);	goto loser;    }    /* Get the wrapped (encrypted) pre-master secret, enc_pms */    enc_pms.len  = SECKEY_PublicKeyStrength(svrPubKey);    enc_pms.data = (unsigned char*)PORT_Alloc(enc_pms.len);    if (enc_pms.data == NULL) {	goto loser;	/* err set by PORT_Alloc */    }    /* wrap pre-master secret in server's public key. */    rv = PK11_PubWrapSymKey(CKM_RSA_PKCS, svrPubKey, pms, &enc_pms);    if (rv != SECSuccess) {	ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);	goto loser;    }    rv = ssl3_InitPendingCipherSpec(ss,  pms);    PK11_FreeSymKey(pms); pms = NULL;    if (rv != SECSuccess) {	ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);	goto loser;    }    rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, 				    isTLS ? enc_pms.len + 2 : enc_pms.len);    if (rv != SECSuccess) {	goto loser;	/* err set by ssl3_AppendHandshake* */    }    if (isTLS) {    	rv = ssl3_AppendHandshakeVariable(ss, enc_pms.data, enc_pms.len, 2);    } else {	rv = ssl3_AppendHandshake(ss, enc_pms.data, enc_pms.len);    }    if (rv != SECSuccess) {	goto loser;	/* err set by ssl3_AppendHandshake* */    }    rv = SECSuccess;loser:    if (enc_pms.data != NULL) {	PORT_Free(enc_pms.data);    }    if (pms != NULL) {    	PK11_FreeSymKey(pms);    }    return rv;}