Commit 197df164 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Don't crash if a chain can't be created for the viewed cert.

parent a52edd78
...@@ -742,8 +742,9 @@ static void set_cert_info(HWND hwnd, ...@@ -742,8 +742,9 @@ static void set_cert_info(HWND hwnd,
CRYPT_PROVIDER_CERT *root = CRYPT_PROVIDER_CERT *root =
&provSigner->pasCertChain[provSigner->csCertChain - 1]; &provSigner->pasCertChain[provSigner->csCertChain - 1];
if (provSigner->pChainContext->TrustStatus.dwErrorStatus & if (!provSigner->pChainContext ||
CERT_TRUST_IS_PARTIAL_CHAIN) (provSigner->pChainContext->TrustStatus.dwErrorStatus &
CERT_TRUST_IS_PARTIAL_CHAIN))
add_icon_to_control(icon, IDB_CERT_WARNING); add_icon_to_control(icon, IDB_CERT_WARNING);
else if (!root->fTrustedRoot) else if (!root->fTrustedRoot)
add_icon_to_control(icon, IDB_CERT_ERROR); add_icon_to_control(icon, IDB_CERT_ERROR);
...@@ -767,8 +768,9 @@ static void set_cert_info(HWND hwnd, ...@@ -767,8 +768,9 @@ static void set_cert_info(HWND hwnd,
if (provSigner->dwError == TRUST_E_CERT_SIGNATURE) if (provSigner->dwError == TRUST_E_CERT_SIGNATURE)
add_string_resource_with_paraformat_to_control(text, add_string_resource_with_paraformat_to_control(text,
IDS_CERT_INFO_BAD_SIG, &parFmt); IDS_CERT_INFO_BAD_SIG, &parFmt);
else if (provSigner->pChainContext->TrustStatus.dwErrorStatus & else if (!provSigner->pChainContext ||
CERT_TRUST_IS_PARTIAL_CHAIN) (provSigner->pChainContext->TrustStatus.dwErrorStatus &
CERT_TRUST_IS_PARTIAL_CHAIN))
add_string_resource_with_paraformat_to_control(text, add_string_resource_with_paraformat_to_control(text,
IDS_CERT_INFO_PARTIAL_CHAIN, &parFmt); IDS_CERT_INFO_PARTIAL_CHAIN, &parFmt);
else if (!root->fTrustedRoot) else if (!root->fTrustedRoot)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment