Module: wine Branch: master Commit: 5b4be5d4c3fa3e43ea19f836e2831d6ba978ad3d URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b4be5d4c3fa3e43ea19f836e2...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Apr 20 16:28:27 2011 +0200
wininet: Use an accessor function instead of directly accessing the X509_STORE_CTX structure.
---
dlls/wininet/netconnection.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index cfc4e7c..5a4be9a 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -162,6 +162,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_num); MAKE_FUNCPTR(sk_value); @@ -328,13 +329,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) @@ -452,6 +454,7 @@ DWORD NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) DYNCRYPTO(ERR_get_error); DYNCRYPTO(ERR_error_string); DYNCRYPTO(X509_STORE_CTX_get_ex_data); + DYNCRYPTO(X509_STORE_CTX_get_chain); DYNCRYPTO(i2d_X509); DYNCRYPTO(sk_num); DYNCRYPTO(sk_value);