Juan Lang : cryptui: Store input file as a store in the file page of CryptUIWizImport.
Alexandre Julliard
julliard at winehq.org
Tue Dec 23 13:41:26 CST 2008
Module: wine
Branch: master
Commit: b9917661aa25f6a58d2e191e67c103b7f5262e57
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b9917661aa25f6a58d2e191e67c103b7f5262e57
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Dec 22 19:17:28 2008 -0800
cryptui: Store input file as a store in the file page of CryptUIWizImport.
---
dlls/cryptui/main.c | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index f8450cc..a7f8a1b 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -3781,7 +3781,8 @@ struct ImportWizData
{
DWORD dwFlags;
LPCWSTR pwszWizardTitle;
- PCCRYPTUI_WIZ_IMPORT_SRC_INFO pImportSrc;
+ CRYPTUI_WIZ_IMPORT_SRC_INFO importSrc;
+ BOOL freeSource;
HCERTSTORE hDestCertStore;
};
@@ -3804,8 +3805,10 @@ static BOOL import_validate_filename(HWND hwnd, struct ImportWizData *data,
warningID = IDS_IMPORT_TYPE_MISMATCH;
else
{
- FIXME("save %s for import\n", debugstr_w(fileName));
- CertCloseStore(source, 0);
+ data->importSrc.dwSubjectChoice =
+ CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE;
+ data->importSrc.u.hCertStore = source;
+ data->freeSource = TRUE;
ret = TRUE;
}
if (warningID)
@@ -4002,11 +4005,18 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
{
PROPSHEETHEADERW hdr;
PROPSHEETPAGEW pages[4];
- struct ImportWizData data = { dwFlags, pwszWizardTitle, pImportSrc,
- hDestCertStore };
+ struct ImportWizData data;
FIXME("\n");
+ data.dwFlags = dwFlags;
+ data.pwszWizardTitle = pwszWizardTitle;
+ if (pImportSrc)
+ memcpy(&data.importSrc, pImportSrc, sizeof(data.importSrc));
+ else
+ memset(&data.importSrc, 0, sizeof(data.importSrc));
+ data.freeSource = FALSE;
+ data.hDestCertStore = hDestCertStore;
memset(&pages, 0, sizeof(pages));
pages[0].dwSize = sizeof(pages[0]);
@@ -4050,6 +4060,9 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
hdr.u3.ppsp = pages;
hdr.nPages = 4;
PropertySheetW(&hdr);
+ if (data.freeSource &&
+ data.importSrc.dwSubjectChoice == CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE)
+ CertCloseStore(data.importSrc.u.hCertStore, 0);
return FALSE;
}
More information about the wine-cvs
mailing list