cryptnet: Change guard variable to simplify loop.

This commit is contained in:
Juan Lang 2009-12-01 15:08:21 -08:00 committed by Alexandre Julliard
parent 4729cdd1e9
commit 165d380852
1 changed files with 4 additions and 5 deletions

View File

@ -1580,7 +1580,9 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index,
} }
else else
endTime = timeout = 0; endTime = timeout = 0;
for (j = 0; ret && j < urlArray->cUrl; j++) if (!ret)
error = GetLastError();
for (j = 0; !error && j < urlArray->cUrl; j++)
{ {
PCCRL_CONTEXT crl; PCCRL_CONTEXT crl;
@ -1593,7 +1595,6 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index,
{ {
/* The CRL isn't time valid */ /* The CRL isn't time valid */
error = CRYPT_E_NO_REVOCATION_CHECK; error = CRYPT_E_NO_REVOCATION_CHECK;
ret = FALSE;
} }
else else
{ {
@ -1604,10 +1605,9 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index,
{ {
error = CRYPT_E_REVOKED; error = CRYPT_E_REVOKED;
pRevStatus->dwIndex = index; pRevStatus->dwIndex = index;
ret = FALSE;
} }
} }
if (ret && timeout) if (!error && timeout)
{ {
DWORD time = GetTickCount(); DWORD time = GetTickCount();
@ -1615,7 +1615,6 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index,
{ {
error = ERROR_TIMEOUT; error = ERROR_TIMEOUT;
pRevStatus->dwIndex = index; pRevStatus->dwIndex = index;
ret = FALSE;
} }
else else
timeout = endTime - time; timeout = endTime - time;