Module: wine Branch: master Commit: da11d66bffd7215806ae5c8ae1af99bd3552666c URL: http://source.winehq.org/git/wine.git/?a=commit;h=da11d66bffd7215806ae5c8ae1...
Author: Juan Lang juan.lang@gmail.com Date: Wed Sep 29 13:46:17 2010 -0700
crypt32: Check usage when verifying the SSL policy.
---
dlls/crypt32/chain.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index fe6093d..7525923 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -3328,6 +3328,15 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID, CERT_TRUST_IS_NOT_TIME_VALID, &pPolicyStatus->lChainIndex, &pPolicyStatus->lElementIndex); } + else if (pChainContext->TrustStatus.dwErrorStatus & + CERT_TRUST_IS_NOT_VALID_FOR_USAGE && + !(checks & SECURITY_FLAG_IGNORE_WRONG_USAGE)) + { + pPolicyStatus->dwError = CERT_E_WRONG_USAGE; + find_element_with_error(pChainContext, + CERT_TRUST_IS_NOT_VALID_FOR_USAGE, &pPolicyStatus->lChainIndex, + &pPolicyStatus->lElementIndex); + } else pPolicyStatus->dwError = NO_ERROR; /* We only need bother checking whether the name in the end certificate