wininet: Respect SECURITY_FLAG_IGNORE_CERT_DATE_INVALID.

This commit is contained in:
David Hedberg 2010-12-19 21:27:23 +01:00 committed by Alexandre Julliard
parent 7af43bb1b2
commit 3ce9304592
1 changed files with 2 additions and 1 deletions

View File

@ -248,7 +248,8 @@ static DWORD netconn_verify_cert(PCCERT_CONTEXT cert, HCERTSTORE store,
CERT_TRUST_IS_REVOKED |
CERT_TRUST_IS_NOT_VALID_FOR_USAGE;
if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_TIME_VALID)
if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_TIME_VALID &&
!(security_flags & SECURITY_FLAG_IGNORE_CERT_DATE_INVALID))
err = ERROR_INTERNET_SEC_CERT_DATE_INVALID;
else if (chain->TrustStatus.dwErrorStatus &
CERT_TRUST_IS_UNTRUSTED_ROOT &&