Commit f09b7fa1 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Set default export format based on whether the private key is to be exported.

parent bd3c9927
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment