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
49f0331c
Commit
49f0331c
authored
Mar 23, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Mar 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Use CERT_STORE_ADD_ALWAYS when reading certs from registry.
parent
3d38e859
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
regstore.c
dlls/crypt32/regstore.c
+6
-7
No files found.
dlls/crypt32/regstore.c
View file @
49f0331c
...
...
@@ -56,8 +56,7 @@ static void CRYPT_HashToStr(const BYTE *hash, LPWSTR asciiHash)
wsprintfW
(
asciiHash
+
i
*
2
,
L"%02X"
,
hash
[
i
]);
}
static
void
CRYPT_RegReadSerializedFromReg
(
HKEY
key
,
DWORD
contextType
,
HCERTSTORE
store
)
static
void
CRYPT_RegReadSerializedFromReg
(
HKEY
key
,
DWORD
contextType
,
HCERTSTORE
store
,
DWORD
disposition
)
{
LONG
rc
;
DWORD
index
=
0
;
...
...
@@ -130,7 +129,7 @@ static void CRYPT_RegReadSerializedFromReg(HKEY key, DWORD contextType,
TRACE
(
"hash matches, adding
\n
"
);
contextInterface
->
addContextToStore
(
store
,
context
,
CERT_STORE_ADD_REPLACE_EXISTING
,
NULL
);
disposition
,
NULL
);
}
else
TRACE
(
"hash doesn't match, ignoring
\n
"
);
...
...
@@ -149,7 +148,7 @@ static void CRYPT_RegReadSerializedFromReg(HKEY key, DWORD contextType,
}
while
(
!
rc
);
}
static
void
CRYPT_RegReadFromReg
(
HKEY
key
,
HCERTSTORE
store
)
static
void
CRYPT_RegReadFromReg
(
HKEY
key
,
HCERTSTORE
store
,
DWORD
disposition
)
{
static
const
WCHAR
*
const
subKeys
[]
=
{
L"Certificates"
,
L"CRLs"
,
L"CTLs"
};
static
const
DWORD
contextFlags
[]
=
{
CERT_STORE_CERTIFICATE_CONTEXT_FLAG
,
...
...
@@ -165,7 +164,7 @@ static void CRYPT_RegReadFromReg(HKEY key, HCERTSTORE store)
&
hKey
,
NULL
);
if
(
!
rc
)
{
CRYPT_RegReadSerializedFromReg
(
hKey
,
contextFlags
[
i
],
store
);
CRYPT_RegReadSerializedFromReg
(
hKey
,
contextFlags
[
i
],
store
,
disposition
);
RegCloseKey
(
hKey
);
}
}
...
...
@@ -463,7 +462,7 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
CRYPT_RegFlushStore
(
store
,
FALSE
);
CRYPT_RegReadFromReg
(
store
->
key
,
memStore
);
CRYPT_RegReadFromReg
(
store
->
key
,
memStore
,
CERT_STORE_ADD_REPLACE_EXISTING
);
I_CertUpdateStore
(
store
->
memStore
,
memStore
,
0
,
0
);
CertCloseStore
(
memStore
,
0
);
break
;
...
...
@@ -551,7 +550,7 @@ WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
list_init
(
&
regInfo
->
certsToDelete
);
list_init
(
&
regInfo
->
crlsToDelete
);
list_init
(
&
regInfo
->
ctlsToDelete
);
CRYPT_RegReadFromReg
(
regInfo
->
key
,
regInfo
->
memStore
);
CRYPT_RegReadFromReg
(
regInfo
->
key
,
regInfo
->
memStore
,
CERT_STORE_ADD_ALWAYS
);
regInfo
->
dirty
=
FALSE
;
provInfo
.
cbSize
=
sizeof
(
provInfo
);
provInfo
.
cStoreProvFunc
=
ARRAY_SIZE
(
regProvFuncs
);
...
...
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