Juan Lang : wininet: Don' t call SSL_connect until initialization is complete.
Alexandre Julliard
julliard at winehq.org
Thu Dec 2 16:30:50 CST 2010
Module: wine
Branch: stable
Commit: 2df1064e69fb3df6dcf35e32b77b78e6f80d3ea8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2df1064e69fb3df6dcf35e32b77b78e6f80d3ea8
Author: Juan Lang <juan.lang at gmail.com>
Date: Tue Sep 28 18:15:58 2010 -0700
wininet: Don't call SSL_connect until initialization is complete.
(cherry picked from commit 98dbdadcdafaa3708e36074708ade5782f892fe4)
---
dlls/wininet/netconnection.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index 08152f5..5676020 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -666,14 +666,6 @@ DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname)
goto fail;
}
- if (pSSL_connect(connection->ssl_s) <= 0)
- {
- res = (DWORD_PTR)pSSL_get_ex_data(connection->ssl_s, error_idx);
- if (!res)
- res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR;
- ERR("SSL_connect failed: %d\n", res);
- goto fail;
- }
if (!pSSL_set_ex_data(connection->ssl_s, hostname_idx, hostname))
{
ERR("SSL_set_ex_data failed: %s\n",
@@ -688,6 +680,14 @@ DWORD NETCON_secure_connect(WININET_NETCONNECTION *connection, LPWSTR hostname)
res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR;
goto fail;
}
+ if (pSSL_connect(connection->ssl_s) <= 0)
+ {
+ res = (DWORD_PTR)pSSL_get_ex_data(connection->ssl_s, error_idx);
+ if (!res)
+ res = ERROR_INTERNET_SECURITY_CHANNEL_ERROR;
+ ERR("SSL_connect failed: %d\n", res);
+ goto fail;
+ }
verify_res = pSSL_get_verify_result(connection->ssl_s);
if (verify_res != X509_V_OK)
{
More information about the wine-cvs
mailing list