diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 9269cb75138..f44cc637683 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -323,14 +323,14 @@ BOOL WINAPI CertGetEnhancedKeyUsage(PCCERT_CONTEXT pCertContext, DWORD dwFlags, DWORD bytesNeeded; BOOL ret = TRUE; - TRACE("(%p, %08lx, %p, %ld)\n", pCertContext, dwFlags, pUsage, *pcbUsage); - if (!pCertContext || !pcbUsage) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + TRACE("(%p, %08lx, %p, %ld)\n", pCertContext, dwFlags, pUsage, *pcbUsage); + if (!(dwFlags & CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG)) { DWORD propSize = 0;