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
35659656
Commit
35659656
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 an add purpose dialog.
parent
3c7e95ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
cryptui_En.rc
dlls/cryptui/cryptui_En.rc
+11
-0
cryptuires.h
dlls/cryptui/cryptuires.h
+3
-0
main.c
dlls/cryptui/main.c
+59
-0
No files found.
dlls/cryptui/cryptui_En.rc
View file @
35659656
...
...
@@ -170,3 +170,14 @@ BEGIN
24,100,220,90
PUSHBUTTON "Add &Purpose...", IDC_ADD_PURPOSE,184,194,60,14
END
IDD_ADD_CERT_PURPOSE DIALOG DISCARDABLE 0,0,200,68
CAPTION "Add Purpose"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Add the object identifier (OID) for the certificate purpose you wish to add:",
stc1, 6,6,190,28
EDITTEXT IDC_NEW_PURPOSE, 6,28,190,14, ES_AUTOVSCROLL|ES_MULTILINE|WS_TABSTOP|WS_VSCROLL
PUSHBUTTON "OK", IDOK, 33,48,60,14
PUSHBUTTON "Cancel", IDCANCEL, 100,48,60,14
END
dlls/cryptui/cryptuires.h
View file @
35659656
...
...
@@ -89,6 +89,7 @@
#define IDD_HIERARCHY 102
#define IDD_USERNOTICE 103
#define IDD_CERT_PROPERTIES_GENERAL 104
#define IDD_ADD_CERT_PURPOSE 105
#define IDB_SMALL_ICONS 200
#define IDB_CERT 201
...
...
@@ -126,4 +127,6 @@
#define IDC_CERTIFICATE_USAGES 2405
#define IDC_ADD_PURPOSE 2406
#define IDC_NEW_PURPOSE 2500
#endif
/* ndef __CRYPTUIRES_H_ */
dlls/cryptui/main.c
View file @
35659656
...
...
@@ -1593,6 +1593,59 @@ static void add_purpose(HWND hwnd, LPCSTR oid)
}
}
#define MAX_PURPOSE 255
static
LRESULT
CALLBACK
add_purpose_dlg_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
LRESULT
ret
=
0
;
char
buf
[
MAX_PURPOSE
+
1
];
switch
(
msg
)
{
case
WM_INITDIALOG
:
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_NEW_PURPOSE
),
EM_SETLIMITTEXT
,
MAX_PURPOSE
,
0
);
ShowScrollBar
(
GetDlgItem
(
hwnd
,
IDC_NEW_PURPOSE
),
SB_VERT
,
FALSE
);
SetWindowLongPtrW
(
hwnd
,
DWLP_USER
,
lp
);
break
;
case
WM_COMMAND
:
switch
(
HIWORD
(
wp
))
{
case
BN_CLICKED
:
switch
(
LOWORD
(
wp
))
{
case
IDOK
:
SendMessageA
(
GetDlgItem
(
hwnd
,
IDC_NEW_PURPOSE
),
WM_GETTEXT
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
(
LPARAM
)
buf
);
if
(
!
buf
[
0
])
{
/* An empty purpose is the same as cancelling */
EndDialog
(
hwnd
,
IDCANCEL
);
ret
=
TRUE
;
}
else
{
HWND
parent
=
(
HWND
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
FIXME
(
"validate %s
\n
"
,
debugstr_a
(
buf
));
add_purpose
(
parent
,
buf
);
EndDialog
(
hwnd
,
wp
);
ret
=
TRUE
;
}
break
;
case
IDCANCEL
:
EndDialog
(
hwnd
,
wp
);
ret
=
TRUE
;
break
;
}
break
;
}
break
;
}
return
ret
;
}
static
WCHAR
*
get_cert_property_as_string
(
PCCERT_CONTEXT
cert
,
DWORD
prop
)
{
WCHAR
*
name
=
NULL
;
...
...
@@ -1862,6 +1915,12 @@ static LRESULT CALLBACK cert_properties_general_dlg_proc(HWND hwnd, UINT msg,
case
BN_CLICKED
:
switch
(
LOWORD
(
wp
))
{
case
IDC_ADD_PURPOSE
:
if
(
DialogBoxParamW
(
hInstance
,
MAKEINTRESOURCEW
(
IDD_ADD_CERT_PURPOSE
),
hwnd
,
add_purpose_dlg_proc
,
(
LPARAM
)
hwnd
)
==
IDOK
)
SendMessageW
(
GetParent
(
hwnd
),
PSM_CHANGED
,
(
WPARAM
)
hwnd
,
0
);
break
;
case
IDC_ENABLE_ALL_PURPOSES
:
case
IDC_DISABLE_ALL_PURPOSES
:
case
IDC_ENABLE_SELECTED_PURPOSES
:
...
...
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