Skip to content

Instantly share code, notes, and snippets.

@miurahr
Created May 2, 2012 13:15
Show Gist options
  • Select an option

  • Save miurahr/2576459 to your computer and use it in GitHub Desktop.

Select an option

Save miurahr/2576459 to your computer and use it in GitHub Desktop.
A patch to support only TLSv1 on WINE. intend to escaping openssl issue on Ubuntu 12.04(LTS) that is caused by openssl 1.x.x cut off negotiation data length. Some application such as evernote fails sync.
--- wine1.4-1.4/dlls/wininet/netconnection.c.keep 2012-03-08 01:11:48.000000000 +0900
+++ wine1.4-1.4/dlls/wininet/netconnection.c 2012-05-02 22:12:36.003843393 +0900
@@ -124,6 +124,7 @@
MAKE_FUNCPTR(SSL_library_init);
MAKE_FUNCPTR(SSL_load_error_strings);
MAKE_FUNCPTR(SSLv23_method);
+MAKE_FUNCPTR(TLSv1_method);
MAKE_FUNCPTR(SSL_CTX_free);
MAKE_FUNCPTR(SSL_CTX_new);
MAKE_FUNCPTR(SSL_new);
@@ -400,6 +401,7 @@
DYNSSL(SSL_library_init);
DYNSSL(SSL_load_error_strings);
DYNSSL(SSLv23_method);
+ DYNSSL(TLSv1_method);
DYNSSL(SSL_CTX_free);
DYNSSL(SSL_CTX_new);
DYNSSL(SSL_new);
@@ -449,7 +451,7 @@
pSSL_load_error_strings();
pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */
- meth = pSSLv23_method();
+ meth = pTLSv1_method();
ctx = pSSL_CTX_new(meth);
if(!pSSL_CTX_set_default_verify_paths(ctx)) {
ERR("SSL_CTX_set_default_verify_paths failed: %s\n",
@miurahr
Copy link
Copy Markdown
Author

miurahr commented Aug 14, 2012

@miurahr
Copy link
Copy Markdown
Author

miurahr commented Aug 14, 2012

This patch breaks WIN32 wininet DLL API. but if you are aware what you are doing, this helps a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment