Alexandre Julliard : winhttp: Use an accessor function instead of directly accessing the X509_STORE_CTX structure .
Alexandre Julliard
julliard at winehq.org
Wed Apr 20 11:05:18 CDT 2011
Module: wine
Branch: master
Commit: 84f2960e5b2e9c0e7fce104dbb3060573e94de85
URL: http://source.winehq.org/git/wine.git/?a=commit;h=84f2960e5b2e9c0e7fce104dbb3060573e94de85
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Apr 20 16:28:31 2011 +0200
winhttp: Use an accessor function instead of directly accessing the X509_STORE_CTX structure.
---
dlls/winhttp/net.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 38fd2cb..02ba1af 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -134,6 +134,7 @@ MAKE_FUNCPTR( ERR_free_strings );
MAKE_FUNCPTR( ERR_get_error );
MAKE_FUNCPTR( ERR_error_string );
MAKE_FUNCPTR( X509_STORE_CTX_get_ex_data );
+MAKE_FUNCPTR( X509_STORE_CTX_get_chain );
MAKE_FUNCPTR( i2d_X509 );
MAKE_FUNCPTR( sk_value );
MAKE_FUNCPTR( sk_num );
@@ -370,13 +371,14 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx )
X509 *cert;
int i;
PCCERT_CONTEXT endCert = NULL;
+ struct stack_st *chain = (struct stack_st *)pX509_STORE_CTX_get_chain( ctx );
ret = TRUE;
- for (i = 0; ret && i < psk_num((struct stack_st *)ctx->chain); i++)
+ for (i = 0; ret && i < psk_num(chain); i++)
{
PCCERT_CONTEXT context;
- cert = (X509 *)psk_value((struct stack_st *)ctx->chain, i);
+ cert = (X509 *)psk_value(chain, i);
if ((context = X509_to_cert_context( cert )))
{
if (i == 0)
@@ -484,6 +486,7 @@ BOOL netconn_init( netconn_t *conn, BOOL secure )
LOAD_FUNCPTR( ERR_get_error );
LOAD_FUNCPTR( ERR_error_string );
LOAD_FUNCPTR( X509_STORE_CTX_get_ex_data );
+ LOAD_FUNCPTR( X509_STORE_CTX_get_chain );
LOAD_FUNCPTR( i2d_X509 );
LOAD_FUNCPTR( sk_value );
LOAD_FUNCPTR( sk_num );
More information about the wine-cvs
mailing list