cryptui: Set default export format based on whether the private key is to be exported.
This commit is contained in:
parent
bd3c992795
commit
f09b7fa12f
|
@ -5570,12 +5570,12 @@ static LRESULT CALLBACK export_private_key_dlg_proc(HWND hwnd, UINT msg,
|
|||
WPARAM wp, LPARAM lp)
|
||||
{
|
||||
LRESULT ret = 0;
|
||||
struct ExportWizData *data;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
struct ExportWizData *data;
|
||||
PROPSHEETPAGEW *page = (PROPSHEETPAGEW *)lp;
|
||||
|
||||
data = (struct ExportWizData *)page->lParam;
|
||||
|
@ -5595,6 +5595,21 @@ static LRESULT CALLBACK export_private_key_dlg_proc(HWND hwnd, UINT msg,
|
|||
PSWIZB_BACK | PSWIZB_NEXT);
|
||||
ret = TRUE;
|
||||
break;
|
||||
case PSN_WIZNEXT:
|
||||
data = (struct ExportWizData *)GetWindowLongPtrW(hwnd, DWLP_USER);
|
||||
if (IsDlgButtonChecked(hwnd, IDC_EXPORT_PRIVATE_KEY_NO))
|
||||
{
|
||||
data->contextInfo.dwExportFormat =
|
||||
CRYPTUI_WIZ_EXPORT_FORMAT_DER;
|
||||
data->contextInfo.fExportPrivateKeys = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->contextInfo.dwExportFormat =
|
||||
CRYPTUI_WIZ_EXPORT_FORMAT_PFX;
|
||||
data->contextInfo.fExportPrivateKeys = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue