From b7fa4a77123fd62886c85731fe246f240952f7cd Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Tue, 28 Oct 2008 11:17:50 -0700 Subject: [PATCH] cryptui: Fix destination store for self-signed certs. --- dlls/cryptui/main.c | 14 +------------- dlls/cryptui/tests/cryptui.c | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index 3b116f00423..afb84912f7a 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -182,27 +182,15 @@ static BOOL is_ca_cert(PCCERT_CONTEXT cert, BOOL defaultIfNotSpecified) return isCA; } -static inline BOOL is_cert_self_signed(PCCERT_CONTEXT cert) -{ - return CertCompareCertificateName(cert->dwCertEncodingType, - &cert->pCertInfo->Subject, &cert->pCertInfo->Issuer); -} - static HCERTSTORE choose_store_for_cert(PCCERT_CONTEXT cert) { - static const WCHAR Root[] = {'R','o','o','t',0}; static const WCHAR AddressBook[] = { 'A','d','d','r','e','s','s', 'B','o','o','k',0 }; static const WCHAR CA[] = { 'C','A',0 }; LPCWSTR storeName; if (is_ca_cert(cert, TRUE)) - { - if (is_cert_self_signed(cert)) - storeName = Root; - else - storeName = CA; - } + storeName = CA; else storeName = AddressBook; return CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, diff --git a/dlls/cryptui/tests/cryptui.c b/dlls/cryptui/tests/cryptui.c index 773168cb0c0..c96bcb53b72 100644 --- a/dlls/cryptui/tests/cryptui.c +++ b/dlls/cryptui/tests/cryptui.c @@ -373,7 +373,6 @@ static void test_crypt_ui_wiz_import(void) info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - todo_wine ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); if (ret) {