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
11e77016
Commit
11e77016
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: Apply changes to enabled usages in response to applying the edit cert properties dialog.
parent
2d2aafbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
main.c
dlls/cryptui/main.c
+49
-1
No files found.
dlls/cryptui/main.c
View file @
11e77016
...
...
@@ -2021,7 +2021,55 @@ static void apply_general_changes(HWND hwnd)
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
(
IsDlgButtonChecked
(
hwnd
,
IDC_ENABLE_ALL_PURPOSES
))
{
/* Setting a NULL usage removes the enhanced key usage property. */
CertSetEnhancedKeyUsage
(
data
->
pCertViewInfo
->
pCertContext
,
NULL
);
}
else
if
(
IsDlgButtonChecked
(
hwnd
,
IDC_DISABLE_ALL_PURPOSES
))
{
CERT_ENHKEY_USAGE
usage
=
{
0
,
NULL
};
CertSetEnhancedKeyUsage
(
data
->
pCertViewInfo
->
pCertContext
,
&
usage
);
}
else
if
(
IsDlgButtonChecked
(
hwnd
,
IDC_ENABLE_SELECTED_PURPOSES
))
{
HWND
lv
=
GetDlgItem
(
hwnd
,
IDC_CERTIFICATE_USAGES
);
CERT_ENHKEY_USAGE
usage
=
{
0
,
NULL
};
int
purposes
=
SendMessageW
(
lv
,
LVM_GETITEMCOUNT
,
0
,
0
),
i
;
LVITEMW
item
;
item
.
mask
=
LVIF_STATE
|
LVIF_PARAM
;
item
.
iSubItem
=
0
;
item
.
stateMask
=
LVIS_STATEIMAGEMASK
;
for
(
i
=
0
;
i
<
purposes
;
i
++
)
{
item
.
iItem
=
i
;
if
(
SendMessageW
(
lv
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
item
))
{
int
state
=
item
.
state
>>
12
;
if
(
state
==
CheckBitmapIndexChecked
)
{
CRYPT_OID_INFO
*
info
=
(
CRYPT_OID_INFO
*
)
item
.
lParam
;
if
(
usage
.
cUsageIdentifier
)
usage
.
rgpszUsageIdentifier
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
usage
.
rgpszUsageIdentifier
,
(
usage
.
cUsageIdentifier
+
1
)
*
sizeof
(
LPSTR
));
else
usage
.
rgpszUsageIdentifier
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPSTR
));
if
(
usage
.
rgpszUsageIdentifier
)
usage
.
rgpszUsageIdentifier
[
usage
.
cUsageIdentifier
++
]
=
(
LPSTR
)
info
->
pszOID
;
}
}
}
CertSetEnhancedKeyUsage
(
data
->
pCertViewInfo
->
pCertContext
,
&
usage
);
HeapFree
(
GetProcessHeap
(),
0
,
usage
.
rgpszUsageIdentifier
);
}
if
(
data
->
pfPropertiesChanged
)
*
data
->
pfPropertiesChanged
=
TRUE
;
}
...
...
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