mirror of
https://github.com/reactos/wine.git
synced 2025-02-04 02:56:31 +00:00
crypt32: Set correct error when encountering unsupported critical extensions in the base and SSL policy.
This commit is contained in:
parent
5b79eb977b
commit
25a8d301c1
@ -2954,6 +2954,16 @@ static BOOL WINAPI verify_base_policy(LPCSTR szPolicyOID,
|
||||
CERT_TRUST_IS_NOT_VALID_FOR_USAGE, &pPolicyStatus->lChainIndex,
|
||||
&pPolicyStatus->lElementIndex);
|
||||
}
|
||||
if (!pPolicyStatus->dwError &&
|
||||
pChainContext->TrustStatus.dwErrorStatus &
|
||||
CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT &&
|
||||
!(checks & CERT_CHAIN_POLICY_IGNORE_NOT_SUPPORTED_CRITICAL_EXT_FLAG))
|
||||
{
|
||||
pPolicyStatus->dwError = CERT_E_CRITICAL;
|
||||
find_element_with_error(pChainContext,
|
||||
CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT, &pPolicyStatus->lChainIndex,
|
||||
&pPolicyStatus->lElementIndex);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -3377,6 +3387,14 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID,
|
||||
CERT_TRUST_IS_OFFLINE_REVOCATION, &pPolicyStatus->lChainIndex,
|
||||
&pPolicyStatus->lElementIndex);
|
||||
}
|
||||
else if (pChainContext->TrustStatus.dwErrorStatus &
|
||||
CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT)
|
||||
{
|
||||
pPolicyStatus->dwError = CERT_E_CRITICAL;
|
||||
find_element_with_error(pChainContext,
|
||||
CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT, &pPolicyStatus->lChainIndex,
|
||||
&pPolicyStatus->lElementIndex);
|
||||
}
|
||||
else
|
||||
pPolicyStatus->dwError = NO_ERROR;
|
||||
/* We only need bother checking whether the name in the end certificate
|
||||
|
@ -3964,7 +3964,7 @@ static const ChainPolicyCheck stanfordPolicyCheckWithoutMatchingName = {
|
||||
|
||||
static const ChainPolicyCheck invalidExtensionPolicyCheck = {
|
||||
{ sizeof(chain30) / sizeof(chain30[0]), chain30 },
|
||||
{ 0, CERT_E_CRITICAL, 0, 1, NULL}, NULL, TODO_ERROR
|
||||
{ 0, CERT_E_CRITICAL, 0, 1, NULL}, NULL, 0
|
||||
};
|
||||
|
||||
static const ChainPolicyCheck authenticodePolicyCheck[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user