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
2d2aafbc
Commit
2d2aafbc
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: Set cert friendly name and description in response to applying the edit…
cryptui: Set cert friendly name and description in response to applying the edit cert properties dialog.
parent
ef8d6d8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
main.c
dlls/cryptui/main.c
+37
-0
No files found.
dlls/cryptui/main.c
View file @
2d2aafbc
...
...
@@ -1989,9 +1989,43 @@ static void toggle_usage(HWND hwnd, int iItem)
}
}
static
void
set_cert_string_property
(
PCCERT_CONTEXT
cert
,
DWORD
prop
,
LPWSTR
str
)
{
if
(
str
&&
strlenW
(
str
))
{
CRYPT_DATA_BLOB
blob
;
blob
.
pbData
=
(
BYTE
*
)
str
;
blob
.
cbData
=
(
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
CertSetCertificateContextProperty
(
cert
,
prop
,
0
,
&
blob
);
}
else
CertSetCertificateContextProperty
(
cert
,
prop
,
0
,
NULL
);
}
#define MAX_FRIENDLY_NAME 40
#define MAX_DESCRIPTION 255
static
void
apply_general_changes
(
HWND
hwnd
)
{
WCHAR
buf
[
MAX_DESCRIPTION
+
1
];
struct
detail_data
*
data
=
(
struct
detail_data
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_FRIENDLY_NAME
),
WM_GETTEXT
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
(
LPARAM
)
buf
);
set_cert_string_property
(
data
->
pCertViewInfo
->
pCertContext
,
CERT_FRIENDLY_NAME_PROP_ID
,
buf
);
SendMessageW
(
GetDlgItem
(
hwnd
,
IDC_DESCRIPTION
),
WM_GETTEXT
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
(
LPARAM
)
buf
);
set_cert_string_property
(
data
->
pCertViewInfo
->
pCertContext
,
CERT_DESCRIPTION_PROP_ID
,
buf
);
FIXME
(
"apply usage state
\n
"
);
if
(
data
->
pfPropertiesChanged
)
*
data
->
pfPropertiesChanged
=
TRUE
;
}
static
LRESULT
CALLBACK
cert_properties_general_dlg_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
...
...
@@ -2028,6 +2062,9 @@ static LRESULT CALLBACK cert_properties_general_dlg_proc(HWND hwnd, UINT msg,
toggle_usage
(
hwnd
,
nm
->
iItem
);
SendMessageW
(
GetParent
(
hwnd
),
PSM_CHANGED
,
(
WPARAM
)
hwnd
,
0
);
break
;
case
PSN_APPLY
:
apply_general_changes
(
hwnd
);
break
;
}
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