cryptui: Add a password page to the export wizard.
This commit is contained in:
parent
7dae1dc512
commit
9c52df8364
|
@ -163,6 +163,8 @@ STRINGTABLE DISCARDABLE
|
||||||
IDS_EXPORT_FAILED "The export failed."
|
IDS_EXPORT_FAILED "The export failed."
|
||||||
IDS_EXPORT_PRIVATE_KEY_TITLE "Export Private Key"
|
IDS_EXPORT_PRIVATE_KEY_TITLE "Export Private Key"
|
||||||
IDS_EXPORT_PRIVATE_KEY_SUBTITLE "The certificate contains a private key which may be exported along with the certificate."
|
IDS_EXPORT_PRIVATE_KEY_SUBTITLE "The certificate contains a private key which may be exported along with the certificate."
|
||||||
|
IDS_EXPORT_PASSWORD_TITLE "Enter Password"
|
||||||
|
IDS_EXPORT_PASSWORD_SUBTITLE "You may password-protect a private key."
|
||||||
}
|
}
|
||||||
|
|
||||||
IDD_GENERAL DIALOG DISCARDABLE 0, 0, 255, 236
|
IDD_GENERAL DIALOG DISCARDABLE 0, 0, 255, 236
|
||||||
|
@ -395,6 +397,16 @@ BEGIN
|
||||||
IDC_EXPORT_PRIVATE_KEY_NO, 31,48,200,12, BS_AUTORADIOBUTTON
|
IDC_EXPORT_PRIVATE_KEY_NO, 31,48,200,12, BS_AUTORADIOBUTTON
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_EXPORT_PASSWORD DIALOG DISCARDABLE 0,0,317,143
|
||||||
|
CAPTION "Certificate Export Wizard"
|
||||||
|
FONT 8, "MS Shell Dlg"
|
||||||
|
BEGIN
|
||||||
|
LTEXT "&Password:", -1, 21,1,195,10
|
||||||
|
EDITTEXT IDC_EXPORT_PASSWORD, 21,11,208,14, ES_AUTOHSCROLL|WS_TABSTOP
|
||||||
|
LTEXT "&Confirm password:", -1, 21,35,195,10
|
||||||
|
EDITTEXT IDC_EXPORT_PASSWORD_CONFIRM, 21,45,208,14, ES_AUTOHSCROLL|WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
IDD_EXPORT_FORMAT DIALOG DISCARDABLE 0,0,317,143
|
IDD_EXPORT_FORMAT DIALOG DISCARDABLE 0,0,317,143
|
||||||
CAPTION "Certificate Export Wizard"
|
CAPTION "Certificate Export Wizard"
|
||||||
FONT 8, "MS Shell Dlg"
|
FONT 8, "MS Shell Dlg"
|
||||||
|
|
|
@ -162,6 +162,8 @@
|
||||||
#define IDS_EXPORT_FAILED 1219
|
#define IDS_EXPORT_FAILED 1219
|
||||||
#define IDS_EXPORT_PRIVATE_KEY_TITLE 1220
|
#define IDS_EXPORT_PRIVATE_KEY_TITLE 1220
|
||||||
#define IDS_EXPORT_PRIVATE_KEY_SUBTITLE 1221
|
#define IDS_EXPORT_PRIVATE_KEY_SUBTITLE 1221
|
||||||
|
#define IDS_EXPORT_PASSWORD_TITLE 1222
|
||||||
|
#define IDS_EXPORT_PASSWORD_SUBTITLE 1223
|
||||||
|
|
||||||
#define IDD_GENERAL 100
|
#define IDD_GENERAL 100
|
||||||
#define IDD_DETAIL 101
|
#define IDD_DETAIL 101
|
||||||
|
@ -259,5 +261,7 @@
|
||||||
#define IDC_EXPORT_SETTINGS 2911
|
#define IDC_EXPORT_SETTINGS 2911
|
||||||
#define IDC_EXPORT_PRIVATE_KEY_YES 2912
|
#define IDC_EXPORT_PRIVATE_KEY_YES 2912
|
||||||
#define IDC_EXPORT_PRIVATE_KEY_NO 2913
|
#define IDC_EXPORT_PRIVATE_KEY_NO 2913
|
||||||
|
#define IDC_EXPORT_PASSWORD 2914
|
||||||
|
#define IDC_EXPORT_PASSWORD_CONFIRM 2915
|
||||||
|
|
||||||
#endif /* ndef __CRYPTUIRES_H_ */
|
#endif /* ndef __CRYPTUIRES_H_ */
|
||||||
|
|
|
@ -5770,6 +5770,40 @@ static LRESULT CALLBACK export_format_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LRESULT CALLBACK export_password_dlg_proc(HWND hwnd, UINT msg,
|
||||||
|
WPARAM wp, LPARAM lp)
|
||||||
|
{
|
||||||
|
LRESULT ret = 0;
|
||||||
|
struct ExportWizData *data;
|
||||||
|
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
{
|
||||||
|
PROPSHEETPAGEW *page = (PROPSHEETPAGEW *)lp;
|
||||||
|
|
||||||
|
data = (struct ExportWizData *)page->lParam;
|
||||||
|
SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WM_NOTIFY:
|
||||||
|
{
|
||||||
|
NMHDR *hdr = (NMHDR *)lp;
|
||||||
|
|
||||||
|
switch (hdr->code)
|
||||||
|
{
|
||||||
|
case PSN_SETACTIVE:
|
||||||
|
PostMessageW(GetParent(hwnd), PSM_SETWIZBUTTONS, 0,
|
||||||
|
PSWIZB_BACK | PSWIZB_NEXT);
|
||||||
|
ret = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static LPWSTR export_append_extension(struct ExportWizData *data,
|
static LPWSTR export_append_extension(struct ExportWizData *data,
|
||||||
LPWSTR fileName)
|
LPWSTR fileName)
|
||||||
{
|
{
|
||||||
|
@ -6521,7 +6555,17 @@ static BOOL show_export_ui(DWORD dwFlags, HWND hwndParent,
|
||||||
}
|
}
|
||||||
if (hasPrivateKey && showFormatPage)
|
if (hasPrivateKey && showFormatPage)
|
||||||
{
|
{
|
||||||
FIXME("add password page\n");
|
pages[nPages].dwSize = sizeof(pages[0]);
|
||||||
|
pages[nPages].hInstance = hInstance;
|
||||||
|
pages[nPages].u.pszTemplate = MAKEINTRESOURCEW(IDD_EXPORT_PASSWORD);
|
||||||
|
pages[nPages].pfnDlgProc = export_password_dlg_proc;
|
||||||
|
pages[nPages].dwFlags = PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||||
|
pages[nPages].pszHeaderTitle =
|
||||||
|
MAKEINTRESOURCEW(IDS_EXPORT_PASSWORD_TITLE);
|
||||||
|
pages[nPages].pszHeaderSubTitle =
|
||||||
|
MAKEINTRESOURCEW(IDS_EXPORT_PASSWORD_SUBTITLE);
|
||||||
|
pages[nPages].lParam = (LPARAM)&data;
|
||||||
|
nPages++;
|
||||||
}
|
}
|
||||||
|
|
||||||
pages[nPages].dwSize = sizeof(pages[0]);
|
pages[nPages].dwSize = sizeof(pages[0]);
|
||||||
|
|
Loading…
Reference in New Issue