Module: wine Branch: master Commit: adf08d586d9bcb8b785c9342aec4ca34862e2199 URL: http://source.winehq.org/git/wine.git/?a=commit;h=adf08d586d9bcb8b785c9342ae...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Jun 10 14:47:48 2011 +0200
wininet: A small netconn_secure_verify code clean up.
---
dlls/wininet/netconnection.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 4334d7f..6c67f28 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -333,12 +333,8 @@ static int netconn_secure_verify(int preverify_ok, X509_STORE_CTX *ctx) cert = (X509 *)psk_value(chain, i); if ((context = X509_to_cert_context(cert))) { - if (i == 0) - ret = CertAddCertificateContextToStore(store, context, - CERT_STORE_ADD_ALWAYS, &endCert); - else - ret = CertAddCertificateContextToStore(store, context, - CERT_STORE_ADD_ALWAYS, NULL); + ret = CertAddCertificateContextToStore(store, context, + CERT_STORE_ADD_ALWAYS, i ? NULL : &endCert); CertFreeCertificateContext(context); } }