Juan Lang : winhttp: Use sk_ functions rather than accessing an OpenSSL stack type directly.
Alexandre Julliard
julliard at winehq.org
Mon Dec 7 10:26:12 CST 2009
Module: wine
Branch: master
Commit: a5facc9bdab28987560e70463aa9706eb9735fac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5facc9bdab28987560e70463aa9706eb9735fac
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri Dec 4 16:41:53 2009 -0800
winhttp: Use sk_ functions rather than accessing an OpenSSL stack type directly.
---
dlls/winhttp/net.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 21b1966..ea1afd3 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -124,6 +124,8 @@ MAKE_FUNCPTR( ERR_get_error );
MAKE_FUNCPTR( ERR_error_string );
MAKE_FUNCPTR( X509_STORE_CTX_get_ex_data );
MAKE_FUNCPTR( i2d_X509 );
+MAKE_FUNCPTR( sk_value );
+MAKE_FUNCPTR( sk_num );
#undef MAKE_FUNCPTR
static CRITICAL_SECTION *ssl_locks;
@@ -339,11 +341,11 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx )
PCCERT_CONTEXT endCert = NULL;
ret = TRUE;
- for (i = 0; ret && i < ctx->chain->num; i++)
+ for (i = 0; ret && i < psk_num((struct stack_st *)ctx->chain); i++)
{
PCCERT_CONTEXT context;
- cert = (X509 *)ctx->chain->data[i];
+ cert = (X509 *)psk_value((struct stack_st *)ctx->chain, i);
if ((context = X509_to_cert_context( cert )))
{
if (i == 0)
@@ -441,6 +443,8 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
LOAD_FUNCPTR( ERR_error_string );
LOAD_FUNCPTR( X509_STORE_CTX_get_ex_data );
LOAD_FUNCPTR( i2d_X509 );
+ LOAD_FUNCPTR( sk_value );
+ LOAD_FUNCPTR( sk_num );
#undef LOAD_FUNCPTR
pSSL_library_init();
More information about the wine-cvs
mailing list