[PATCH 1/2] crypt32/tests: Add revocation flags tests for CertGetCertificateChain().
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> --- dlls/crypt32/tests/chain.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c index a6599b21ae..c997068a06 100644 --- a/dlls/crypt32/tests/chain.c +++ b/dlls/crypt32/tests/chain.c @@ -4145,6 +4145,23 @@ static void testGetCertChain(void) test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Issuer, "US, GeoTrust Inc., GeoTrust Global CA"); test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Subject, "US, GeoTrust Inc., GeoTrust Global CA"); + /* Test revocation flags */ + ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_END_CERT, NULL, + &chain); + ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); + ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus); + + ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_CHAIN, NULL, &chain); + ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); + todo_wine ok(!chain->TrustStatus.dwErrorStatus + || broken(chain->TrustStatus.dwErrorStatus == CERT_TRUST_REVOCATION_STATUS_UNKNOWN), /* XP */ + "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus); + + ret = CertGetCertificateChain(NULL, cert, &fileTime, store, ¶, CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT, + NULL, &chain); + ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError()); + ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus); + pCertFreeCertificateChain(chain); /* Test HCCE_LOCAL_MACHINE */ -- 2.18.0
participants (1)
-
Zhiyi Zhang