From adf08d586d9bcb8b785c9342aec4ca34862e2199 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 10 Jun 2011 14:47:48 +0200 Subject: [PATCH] wininet: A small netconn_secure_verify code clean up. --- dlls/wininet/netconnection.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 4334d7f87ef..6c67f284ee1 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); } }