Juan Lang : winhttp: Move initialization of SSL_CTX to library initialization time.
Alexandre Julliard
julliard at winehq.org
Mon Oct 5 09:54:23 CDT 2009
Module: wine
Branch: master
Commit: 016d7c3c0a3f1180f8ed9081d96229f41c486eee
URL: http://source.winehq.org/git/wine.git/?a=commit;h=016d7c3c0a3f1180f8ed9081d96229f41c486eee
Author: Juan Lang <juan.lang at gmail.com>
Date: Wed Sep 30 10:29:38 2009 -0700
winhttp: Move initialization of SSL_CTX to library initialization time.
---
dlls/winhttp/net.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index ed4d4b9..b264314 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -234,6 +234,13 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
pBIO_new_fp( stderr, BIO_NOCLOSE );
method = pSSLv23_method();
+ ctx = pSSL_CTX_new( method );
+ if (!pSSL_CTX_set_default_verify_paths( ctx ))
+ {
+ ERR("SSL_CTX_set_default_verify_paths failed: %s\n", pERR_error_string( pERR_get_error(), 0 ));
+ set_last_error( ERROR_OUTOFMEMORY );
+ return FALSE;
+ }
#else
WARN("SSL support not compiled in.\n");
set_last_error( ERROR_WINHTTP_SECURE_CHANNEL_ERROR );
@@ -333,13 +340,6 @@ BOOL netconn_secure_connect( netconn_t *conn )
X509 *cert;
long res;
- ctx = pSSL_CTX_new( method );
- if (!pSSL_CTX_set_default_verify_paths( ctx ))
- {
- ERR("SSL_CTX_set_default_verify_paths failed: %s\n", pERR_error_string( pERR_get_error(), 0 ));
- set_last_error( ERROR_OUTOFMEMORY );
- return FALSE;
- }
if (!(conn->ssl_conn = pSSL_new( ctx )))
{
ERR("SSL_new failed: %s\n", pERR_error_string( pERR_get_error(), 0 ));
More information about the wine-cvs
mailing list