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
e9c44cc0
Commit
e9c44cc0
authored
Feb 16, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Feb 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix system stores and a memory leak.
- system stores open both HKLM and HKCU for "current user" locations - fix a memory leak in certificate properties
parent
582eeaa5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
cert.c
dlls/crypt32/cert.c
+25
-6
No files found.
dlls/crypt32/cert.c
View file @
e9c44cc0
...
...
@@ -1718,12 +1718,27 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
{
store
=
CertOpenStore
(
CERT_STORE_PROV_COLLECTION
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
if
(
store
)
CertAddStoreToCollection
(
store
,
regStore
,
dwFlags
&
CERT_STORE_READONLY_FLAG
?
0
:
CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG
,
0
);
CertCloseStore
(
regStore
,
0
);
/* CERT_SYSTEM_STORE_CURRENT_USER returns both the HKCU and HKLM
* stores.
*/
if
((
dwFlags
&
CERT_SYSTEM_STORE_LOCATION_MASK
)
==
CERT_SYSTEM_STORE_CURRENT_USER
)
{
CertAddStoreToCollection
(
store
,
regStore
,
dwFlags
&
CERT_STORE_READONLY_FLAG
?
0
:
CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG
,
0
);
CertCloseStore
(
regStore
,
0
);
dwFlags
&=
~
CERT_SYSTEM_STORE_CURRENT_USER
;
dwFlags
|=
CERT_SYSTEM_STORE_LOCAL_MACHINE
;
regStore
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_REGISTRY_W
,
0
,
hCryptProv
,
dwFlags
,
pvPara
);
if
(
regStore
)
{
CertAddStoreToCollection
(
store
,
regStore
,
dwFlags
&
CERT_STORE_READONLY_FLAG
?
0
:
CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG
,
0
);
CertCloseStore
(
regStore
,
0
);
}
}
}
}
...
...
@@ -2227,15 +2242,19 @@ static BOOL CRYPT_SaveCertificateContextProperty(PWINE_CERT_CONTEXT context,
if
(
!
cbData
||
data
)
{
PWINE_CERT_PROPERTY
prop
;
BOOL
found
=
FALSE
;
EnterCriticalSection
(
&
context
->
cs
);
LIST_FOR_EACH_ENTRY
(
prop
,
&
context
->
extendedProperties
,
WINE_CERT_PROPERTY
,
entry
)
{
if
(
prop
->
hdr
.
propID
==
dwPropId
)
{
found
=
TRUE
;
break
;
}
}
if
(
prop
&&
prop
->
entry
.
next
!=
&
context
->
extendedProperties
)
if
(
found
)
{
CryptMemFree
(
prop
->
pbData
);
prop
->
hdr
.
cb
=
cbData
;
...
...
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