> I'm a bit busy with other things, so time's a bit short. Would you > mind pointing me in the right direction for the best approach for > this? Or perhaps send a patch? <g>
Sure. How's the attached look to you? Should it be an ERR instead? What text would you find more helpful? --Juan
From 0fcce2936dea2b705011b82d465d815d7e3a8e32 Mon Sep 17 00:00:00 2001 From: Juan Lang <juan.l...@gmail.com> Date: Mon, 4 May 2009 18:50:28 -0700 Subject: [PATCH] Warn if no trusted root certificates are found. --- dlls/crypt32/rootstore.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c index a2ed6e5..f369084 100644 --- a/dlls/crypt32/rootstore.c +++ b/dlls/crypt32/rootstore.c @@ -696,14 +696,23 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store) if (from) { - DWORD i; + DWORD i, count; BOOL ret = FALSE; + PCCERT_CONTEXT cert = NULL; for (i = 0; !ret && i < sizeof(CRYPT_knownLocations) / sizeof(CRYPT_knownLocations[0]); i++) ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE); check_and_store_certs(from, store); + count = 0; + do { + cert = CertEnumCertificatesInStore(store, cert); + if (cert) + count++; + } while (cert); + if (!count) + WARN("find zero trusted root certificates. Are they installed?\n"); } } -- 1.5.2.2