Juan Lang : wintrust: Only set the error on the root element of the chain.

Alexandre Julliard julliard at winehq.org
Tue Sep 30 11:15:42 CDT 2008


Module: wine
Branch: master
Commit: cdfb393db4ec8a369db2485eac4fdb59935604fb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cdfb393db4ec8a369db2485eac4fdb59935604fb

Author: Juan Lang <juan.lang at gmail.com>
Date:   Sat Sep 27 11:32:50 2008 -0700

wintrust: Only set the error on the root element of the chain.

---

 dlls/wintrust/softpub.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index 918e103..9140182 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -611,9 +611,6 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
     data->pasSigners[signerIdx].pasCertChain[0].dwConfidence =
      WINTRUST_TrustStatusToConfidence(
      simpleChain->rgpElement[0]->TrustStatus.dwErrorStatus);
-    data->pasSigners[signerIdx].pasCertChain[0].dwError =
-     WINTRUST_TrustStatusToError(
-     simpleChain->rgpElement[0]->TrustStatus.dwErrorStatus);
     data->pasSigners[signerIdx].pasCertChain[0].pChainElement =
      simpleChain->rgpElement[0];
     ret = TRUE;
@@ -628,11 +625,12 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx)
             data->pasSigners[signerIdx].pasCertChain[i].dwConfidence =
              WINTRUST_TrustStatusToConfidence(
              simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus);
-            data->pasSigners[signerIdx].pasCertChain[i].dwError =
-             WINTRUST_TrustStatusToError(
-             simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus);
         }
     }
+    data->pasSigners[signerIdx].pasCertChain[simpleChain->cElement - 1].dwError
+     = WINTRUST_TrustStatusToError(
+     simpleChain->rgpElement[simpleChain->cElement - 1]->
+     TrustStatus.dwErrorStatus);
     return ret;
 }
 




More information about the wine-cvs mailing list