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
2bab6a2c
Commit
2bab6a2c
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: Implement specifying the destination store in CryptUIWizImport.
parent
9f6c5433
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
1 deletion
+68
-1
cryptui_En.rc
dlls/cryptui/cryptui_En.rc
+2
-1
cryptuires.h
dlls/cryptui/cryptuires.h
+1
-0
main.c
dlls/cryptui/main.c
+65
-0
No files found.
dlls/cryptui/cryptui_En.rc
View file @
2bab6a2c
...
...
@@ -79,6 +79,7 @@ STRINGTABLE DISCARDABLE
IDS_IMPORT_EMPTY_FILE "Please select a file."
IDS_IMPORT_BAD_FORMAT "The file format is not recognized. Please select another file."
IDS_IMPORT_OPEN_FAILED "Could not open "
IDS_IMPORT_DEST_DETERMINED "Determined by the program"
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"
...
...
@@ -254,7 +255,7 @@ BEGIN
IDC_IMPORT_AUTO_STORE, 31,18,180,12, BS_AUTORADIOBUTTON|WS_TABSTOP
AUTORADIOBUTTON "&Place all certificates in the following store:",
IDC_IMPORT_SPECIFY_STORE, 31,30,180,12, BS_AUTORADIOBUTTON
EDITTEXT IDC_IMPORT_STORE, 44,49,185,14, ES_
AUTOHSCROLL|WS_TABSTOP
EDITTEXT IDC_IMPORT_STORE, 44,49,185,14, ES_
READONLY
PUSHBUTTON "B&rowse...", IDC_IMPORT_BROWSE_STORE, 236,49,60,14
END
...
...
dlls/cryptui/cryptuires.h
View file @
2bab6a2c
...
...
@@ -76,6 +76,7 @@
#define IDS_IMPORT_EMPTY_FILE 1056
#define IDS_IMPORT_BAD_FORMAT 1057
#define IDS_IMPORT_OPEN_FAILED 1058
#define IDS_IMPORT_DEST_DETERMINED 1059
#define IDS_PURPOSE_SERVER_AUTH 1100
#define IDS_PURPOSE_CLIENT_AUTH 1101
...
...
dlls/cryptui/main.c
View file @
2bab6a2c
...
...
@@ -3784,6 +3784,8 @@ struct ImportWizData
CRYPTUI_WIZ_IMPORT_SRC_INFO
importSrc
;
BOOL
freeSource
;
HCERTSTORE
hDestCertStore
;
BOOL
freeDest
;
BOOL
autoDest
;
};
static
BOOL
import_validate_filename
(
HWND
hwnd
,
struct
ImportWizData
*
data
,
...
...
@@ -3953,9 +3955,23 @@ static LRESULT CALLBACK import_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
LPARAM
lp
)
{
LRESULT
ret
=
0
;
struct
ImportWizData
*
data
;
switch
(
msg
)
{
case
WM_INITDIALOG
:
{
PROPSHEETPAGEW
*
page
=
(
PROPSHEETPAGEW
*
)
lp
;
data
=
(
struct
ImportWizData
*
)
page
->
lParam
;
SetWindowLongPtrW
(
hwnd
,
DWLP_USER
,
(
LPARAM
)
data
);
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_AUTO_STORE
),
BM_CLICK
,
0
,
0
);
if
(
data
->
dwFlags
&
CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE
)
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_SPECIFY_STORE
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_STORE
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_BROWSE_STORE
),
FALSE
);
break
;
}
case
WM_NOTIFY
:
{
NMHDR
*
hdr
=
(
NMHDR
*
)
lp
;
...
...
@@ -3970,6 +3986,51 @@ static LRESULT CALLBACK import_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
}
break
;
}
case
WM_COMMAND
:
switch
(
wp
)
{
case
IDC_IMPORT_AUTO_STORE
:
data
=
(
struct
ImportWizData
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
data
->
autoDest
=
TRUE
;
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_STORE
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_BROWSE_STORE
),
FALSE
);
break
;
case
IDC_IMPORT_SPECIFY_STORE
:
data
=
(
struct
ImportWizData
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
data
->
autoDest
=
FALSE
;
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_STORE
),
TRUE
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_BROWSE_STORE
),
TRUE
);
break
;
case
IDC_IMPORT_BROWSE_STORE
:
{
CRYPTUI_ENUM_SYSTEM_STORE_ARGS
enumArgs
=
{
CERT_SYSTEM_STORE_CURRENT_USER
,
NULL
};
CRYPTUI_ENUM_DATA
enumData
=
{
0
,
NULL
,
1
,
&
enumArgs
};
CRYPTUI_SELECTSTORE_INFO_W
selectInfo
;
HCERTSTORE
store
;
data
=
(
struct
ImportWizData
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
selectInfo
.
dwSize
=
sizeof
(
selectInfo
);
selectInfo
.
parent
=
hwnd
;
selectInfo
.
dwFlags
=
CRYPTUI_ENABLE_SHOW_PHYSICAL_STORE
;
selectInfo
.
pwszTitle
=
selectInfo
.
pwszTitle
=
NULL
;
selectInfo
.
pEnumData
=
&
enumData
;
selectInfo
.
pfnSelectedStoreCallback
=
NULL
;
if
((
store
=
CryptUIDlgSelectStoreW
(
&
selectInfo
)))
{
WCHAR
storeTitle
[
MAX_STRING_LEN
];
LoadStringW
(
hInstance
,
IDS_IMPORT_DEST_DETERMINED
,
storeTitle
,
sizeof
(
storeTitle
)
/
sizeof
(
storeTitle
[
0
]));
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_IMPORT_STORE
),
WM_SETTEXT
,
0
,
(
LPARAM
)
storeTitle
);
data
->
hDestCertStore
=
store
;
data
->
freeDest
=
TRUE
;
}
break
;
}
}
break
;
}
return
ret
;
}
...
...
@@ -4018,6 +4079,9 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
memset
(
&
data
.
importSrc
,
0
,
sizeof
(
data
.
importSrc
));
data
.
freeSource
=
FALSE
;
data
.
hDestCertStore
=
hDestCertStore
;
data
.
freeDest
=
FALSE
;
data
.
autoDest
=
TRUE
;
memset
(
&
pages
,
0
,
sizeof
(
pages
));
pages
[
nPages
].
dwSize
=
sizeof
(
pages
[
0
]);
...
...
@@ -4050,6 +4114,7 @@ static BOOL show_import_ui(DWORD dwFlags, HWND hwndParent,
pages
[
nPages
].
pszHeaderTitle
=
MAKEINTRESOURCEW
(
IDS_IMPORT_STORE_TITLE
);
pages
[
nPages
].
pszHeaderSubTitle
=
MAKEINTRESOURCEW
(
IDS_IMPORT_STORE_SUBTITLE
);
pages
[
nPages
].
lParam
=
(
LPARAM
)
&
data
;
nPages
++
;
pages
[
nPages
].
dwSize
=
sizeof
(
pages
[
0
]);
...
...
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