Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7153a6fb
Commit
7153a6fb
authored
Dec 18, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Dec 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptui: Add (empty) edit cert properties dialog.
parent
63be2a03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
1 deletion
+115
-1
cryptui_En.rc
dlls/cryptui/cryptui_En.rc
+23
-0
cryptuires.h
dlls/cryptui/cryptuires.h
+10
-0
main.c
dlls/cryptui/main.c
+82
-1
No files found.
dlls/cryptui/cryptui_En.rc
View file @
7153a6fb
...
...
@@ -58,6 +58,7 @@ STRINGTABLE DISCARDABLE
IDS_PROP_ENHKEY_USAGE "Enhanced key usage (property)"
IDS_PROP_FRIENDLY_NAME "Friendly name"
IDS_PROP_DESCRIPTION "Description"
IDS_CERTIFICATE_PROPERTIES "Certificate Properties"
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"
...
...
@@ -147,3 +148,25 @@ BEGIN
PUSHBUTTON "Close", IDOK,103,216,70,14
PUSHBUTTON "More &Info", IDC_CPS,177,216,70,14
END
IDD_CERT_PROPERTIES_GENERAL DIALOG DISCARDABLE 0, 0, 255, 236
CAPTION "General"
STYLE WS_VISIBLE
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Friendly name:", stc1, 6,14,60,14
EDITTEXT IDC_FRIENDLY_NAME, 60,12,191,14, ES_AUTOHSCROLL|WS_TABSTOP
LTEXT "&Description:", stc2, 6,32,60,14
EDITTEXT IDC_DESCRIPTION, 60,30,191,14, ES_AUTOVSCROLL|ES_MULTILINE|WS_TABSTOP|WS_VSCROLL
GROUPBOX "Certificate purposes", grp1,6,48,245,165, BS_GROUPBOX
AUTORADIOBUTTON "&Enable all purposes for this certificate",
IDC_ENABLE_ALL_PURPOSES, 12,58,180,14, BS_AUTORADIOBUTTON|WS_TABSTOP
AUTORADIOBUTTON "D&isable all purposes for this certificate",
IDC_DISABLE_ALL_PURPOSES, 12,70,180,14, BS_AUTORADIOBUTTON
AUTORADIOBUTTON "Enable &only the following purposes for this certificate:",
IDC_ENABLE_SELECTED_PURPOSES, 12,82,180,14, BS_AUTORADIOBUTTON
CONTROL "", IDC_CERTIFICATE_USAGES,"SysListView32",
LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER,
24,100,220,90
PUSHBUTTON "Add &Purpose...", IDC_ADD_PURPOSE,184,194,60,14
END
dlls/cryptui/cryptuires.h
View file @
7153a6fb
...
...
@@ -55,6 +55,7 @@
#define IDS_PROP_ENHKEY_USAGE 1035
#define IDS_PROP_FRIENDLY_NAME 1036
#define IDS_PROP_DESCRIPTION 1037
#define IDS_CERTIFICATE_PROPERTIES 1038
#define IDS_PURPOSE_SERVER_AUTH 1100
#define IDS_PURPOSE_CLIENT_AUTH 1101
...
...
@@ -87,6 +88,7 @@
#define IDD_DETAIL 101
#define IDD_HIERARCHY 102
#define IDD_USERNOTICE 103
#define IDD_CERT_PROPERTIES_GENERAL 104
#define IDB_SMALL_ICONS 200
#define IDB_CERT 201
...
...
@@ -116,4 +118,12 @@
#define IDC_USERNOTICE 2300
#define IDC_CPS 2301
#define IDC_FRIENDLY_NAME 2400
#define IDC_DESCRIPTION 2401
#define IDC_ENABLE_ALL_PURPOSES 2402
#define IDC_DISABLE_ALL_PURPOSES 2403
#define IDC_ENABLE_SELECTED_PURPOSES 2404
#define IDC_CERTIFICATE_USAGES 2405
#define IDC_ADD_PURPOSE 2406
#endif
/* ndef __CRYPTUIRES_H_ */
dlls/cryptui/main.c
View file @
7153a6fb
...
...
@@ -1554,6 +1554,76 @@ static void create_cert_details_list(HWND hwnd, struct detail_data *data)
set_fields_selection
(
hwnd
,
data
,
0
);
}
#define MAX_FRIENDLY_NAME 40
#define MAX_DESCRIPTION 255
static
LRESULT
CALLBACK
cert_properties_general_dlg_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
PROPSHEETPAGEW
*
page
;
struct
detail_data
*
data
;
TRACE
(
"(%p, %08x, %08lx, %08lx)
\n
"
,
hwnd
,
msg
,
wp
,
lp
);
switch
(
msg
)
{
case
WM_INITDIALOG
:
{
HWND
description
=
GetDlgItem
(
hwnd
,
IDC_DESCRIPTION
);
page
=
(
PROPSHEETPAGEW
*
)
lp
;
data
=
(
struct
detail_data
*
)
page
->
lParam
;
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_FRIENDLY_NAME
),
EM_SETLIMITTEXT
,
MAX_FRIENDLY_NAME
,
0
);
SendMessageW
(
description
,
EM_SETLIMITTEXT
,
MAX_DESCRIPTION
,
0
);
ShowScrollBar
(
description
,
SB_VERT
,
FALSE
);
FIXME
(
"set general properties
\n
"
);
SetWindowLongPtrW
(
hwnd
,
DWLP_USER
,
(
LPARAM
)
data
);
break
;
}
case
WM_COMMAND
:
switch
(
HIWORD
(
wp
))
{
case
BN_CLICKED
:
switch
(
LOWORD
(
wp
))
{
case
IDC_ADD_PURPOSE
:
FIXME
(
"show add purpose dialog
\n
"
);
break
;
}
break
;
}
break
;
}
return
0
;
}
static
void
show_edit_cert_properties_dialog
(
HWND
parent
,
struct
detail_data
*
data
)
{
PROPSHEETHEADERW
hdr
;
PROPSHEETPAGEW
page
;
/* FIXME: need to add a cross-certificate page */
TRACE
(
"(%p)
\n
"
,
data
);
memset
(
&
page
,
0
,
sizeof
(
PROPSHEETPAGEW
));
page
.
dwSize
=
sizeof
(
page
);
page
.
hInstance
=
hInstance
;
page
.
u
.
pszTemplate
=
MAKEINTRESOURCEW
(
IDD_CERT_PROPERTIES_GENERAL
);
page
.
pfnDlgProc
=
cert_properties_general_dlg_proc
;
page
.
lParam
=
(
LPARAM
)
data
;
memset
(
&
hdr
,
0
,
sizeof
(
hdr
));
hdr
.
dwSize
=
sizeof
(
hdr
);
hdr
.
hwndParent
=
parent
;
hdr
.
dwFlags
=
PSH_PROPSHEETPAGE
;
hdr
.
hInstance
=
hInstance
;
hdr
.
pszCaption
=
MAKEINTRESOURCEW
(
IDS_CERTIFICATE_PROPERTIES
);
hdr
.
u3
.
ppsp
=
&
page
;
hdr
.
nPages
=
1
;
PropertySheetW
(
&
hdr
);
}
static
void
free_detail_fields
(
struct
detail_data
*
data
)
{
DWORD
i
;
...
...
@@ -1649,8 +1719,19 @@ static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
FIXME
(
"call CryptUIWizExport
\n
"
);
break
;
case
IDC_EDITPROPERTIES
:
FIXME
(
"show edit properties dialog
\n
"
);
{
HWND
cb
=
GetDlgItem
(
hwnd
,
IDC_DETAIL_SELECT
);
int
curSel
;
curSel
=
SendMessageW
(
cb
,
CB_GETCURSEL
,
0
,
0
);
/* Actually, any index will do, since they all store the same
* data value
*/
data
=
(
struct
detail_data
*
)
SendMessageW
(
cb
,
CB_GETITEMDATA
,
curSel
,
0
);
show_edit_cert_properties_dialog
(
GetParent
(
hwnd
),
data
);
break
;
}
case
((
CBN_SELCHANGE
<<
16
)
|
IDC_DETAIL_SELECT
):
refresh_details_view
(
hwnd
);
break
;
...
...
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