Wow fix for wine (patch no-sslv3).

Wine for wow patch no sslv3 (maybe bc of BEAST attack blocked by blizzard).

http://us.battle.net/wow/en/forum/topic/20742995286?page=11

BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cred)
{
 gnutls_session_t *s = (gnutls_session_t*)session;
 // char priority[64] = "NORMAL", *p;
 char priority[128] = "NORMAL", *p; // MODIFIED for WoW: Added extra length to buffer.
 unsigned i;

 int err = pgnutls_init(s, cred->credential_use == SECPKG_CRED_INBOUND ? GNUTLS_SERVER : GNUTLS_CLIENT);
 if (err != GNUTLS_E_SUCCESS)
 {
 pgnutls_perror(err);
 return FALSE;
 }

 p = priority + strlen(priority);
 for(i=0; i < sizeof(protocol_priority_flags)/sizeof(*protocol_priority_flags); i++) {
 *p++ = ':';
 *p++ = (cred->enabled_protocols & protocol_priority_flags[i].enable_flag) ? '+' : '-';
 strcpy(p, protocol_priority_flags[i].gnutls_flag);
 p += strlen(p);
 }

 // ADDED for WoW: Tells gnutls to not specify SSLv3 during handshake.
 strcpy(p, ":%LATEST_RECORD_VERSION");
 p += strlen(p);
 // END OF ADDED CODE

 TRACE("Using %s priority\n", debugstr_a(priority));
 err = pgnutls_priority_set_direct(*s, priority, NULL);
 if (err != GNUTLS_E_SUCCESS)
 {
 pgnutls_perror(err);
 pgnutls_deinit(*s);
 return FALSE;
 }

 err = pgnutls_credentials_set(*s, GNUTLS_CRD_CERTIFICATE,
 (gnutls_certificate_credentials_t)cred->credentials);
 if (err != GNUTLS_E_SUCCESS)
 {
 pgnutls_perror(err);
 pgnutls_deinit(*s);
 return FALSE;
 }

 pgnutls_transport_set_pull_function(*s, schan_pull_adapter);
 pgnutls_transport_set_push_function(*s, schan_push_adapter);

 return TRUE;
}

Filed under Linux, Wow · Tagged with

Comments: