mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 13:04:24 +00:00
cryptui: Fix destination store for self-signed certs.
This commit is contained in:
parent
472984f565
commit
b7fa4a7712
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue