Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9169e6ed
Commit
9169e6ed
authored
Dec 22, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Make sure input file is not empty.
parent
dbab34e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
cryptui_En.rc
dlls/cryptui/cryptui_En.rc
+1
-0
cryptuires.h
dlls/cryptui/cryptuires.h
+1
-0
main.c
dlls/cryptui/main.c
+35
-3
No files found.
dlls/cryptui/cryptui_En.rc
View file @
9169e6ed
...
...
@@ -76,6 +76,7 @@ STRINGTABLE DISCARDABLE
IDS_IMPORT_FILTER_SERIALIZED_STORE "Microsoft Serialized Certificate Store (*.sst)"
IDS_IMPORT_FILTER_CMS "CMS/PKCS #7 Messages (*.spc; *.p7b)"
IDS_IMPORT_FILTER_ALL "All Files (*.*)"
IDS_IMPORT_EMPTY_FILE "Please select a file."
IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer"
IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer"
IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication"
...
...
dlls/cryptui/cryptuires.h
View file @
9169e6ed
...
...
@@ -73,6 +73,7 @@
#define IDS_IMPORT_FILTER_SERIALIZED_STORE 1053
#define IDS_IMPORT_FILTER_CMS 1054
#define IDS_IMPORT_FILTER_ALL 1055
#define IDS_IMPORT_EMPTY_FILE 1056
#define IDS_PURPOSE_SERVER_AUTH 1100
#define IDS_PURPOSE_CLIENT_AUTH 1101
...
...
dlls/cryptui/main.c
View file @
9169e6ed
...
...
@@ -3529,7 +3529,8 @@ static BOOL check_context_type(DWORD dwFlags, DWORD type)
}
static
void
import_warn_type_mismatch
(
DWORD
dwFlags
,
HWND
hwnd
,
LPCWSTR
szTitle
)
static
void
import_warning
(
DWORD
dwFlags
,
HWND
hwnd
,
LPCWSTR
szTitle
,
int
warningID
)
{
if
(
!
(
dwFlags
&
CRYPTUI_WIZ_NO_UI
))
{
...
...
@@ -3544,12 +3545,17 @@ static void import_warn_type_mismatch(DWORD dwFlags, HWND hwnd, LPCWSTR szTitle)
sizeof
(
title
)
/
sizeof
(
title
[
0
]));
pTitle
=
title
;
}
LoadStringW
(
hInstance
,
IDS_IMPORT_TYPE_MISMATCH
,
error
,
LoadStringW
(
hInstance
,
warningID
,
error
,
sizeof
(
error
)
/
sizeof
(
error
[
0
]));
MessageBoxW
(
hwnd
,
error
,
pTitle
,
MB_ICONERROR
|
MB_OK
);
}
}
static
void
import_warn_type_mismatch
(
DWORD
dwFlags
,
HWND
hwnd
,
LPCWSTR
szTitle
)
{
import_warning
(
dwFlags
,
hwnd
,
szTitle
,
IDS_IMPORT_TYPE_MISMATCH
);
}
static
BOOL
check_store_context_type
(
DWORD
dwFlags
,
HCERTSTORE
store
)
{
BOOL
ret
;
...
...
@@ -3765,6 +3771,7 @@ static WCHAR *make_import_file_filter(DWORD dwFlags)
struct
ImportWizData
{
DWORD
dwFlags
;
LPCWSTR
pwszWizardTitle
;
PCCRYPTUI_WIZ_IMPORT_SRC_INFO
pImportSrc
;
HCERTSTORE
hDestCertStore
;
};
...
...
@@ -3796,6 +3803,30 @@ static LRESULT CALLBACK import_file_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
PSWIZB_BACK
|
PSWIZB_NEXT
);
ret
=
TRUE
;
break
;
case
PSN_WIZNEXT
:
{
HWND
fileNameEdit
=
GetDlgItem
(
hwnd
,
IDC_IMPORT_FILENAME
);
DWORD
len
=
SendMessageW
(
fileNameEdit
,
WM_GETTEXTLENGTH
,
0
,
0
);
data
=
(
struct
ImportWizData
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
if
(
!
len
)
{
import_warning
(
data
->
dwFlags
,
hwnd
,
data
->
pwszWizardTitle
,
IDS_IMPORT_EMPTY_FILE
);
SetWindowLongPtrW
(
hwnd
,
DWLP_MSGRESULT
,
1
);
ret
=
1
;
}
else
{
LPWSTR
fileName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
SendMessageW
(
fileNameEdit
,
WM_GETTEXT
,
len
+
1
,
(
LPARAM
)
fileName
);
FIXME
(
"validate %s
\n
"
,
debugstr_w
(
fileName
));
}
break
;
}
}
break
;
}
...
...
@@ -3883,7 +3914,8 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
{
PROPSHEETHEADERW
hdr
;
PROPSHEETPAGEW
pages
[
4
];
struct
ImportWizData
data
=
{
dwFlags
,
pImportSrc
,
hDestCertStore
};
struct
ImportWizData
data
=
{
dwFlags
,
pwszWizardTitle
,
pImportSrc
,
hDestCertStore
};
FIXME
(
"
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment