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
330d6ab8
Commit
330d6ab8
authored
Mar 22, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Mar 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Refactor CRYPT_ImportSystemRootCertsToReg().
parent
49f0331c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
rootstore.c
dlls/crypt32/rootstore.c
+19
-15
No files found.
dlls/crypt32/rootstore.c
View file @
330d6ab8
...
...
@@ -657,7 +657,7 @@ static HCERTSTORE create_root_store(void)
void
CRYPT_ImportSystemRootCertsToReg
(
void
)
{
HCERTSTORE
store
=
NULL
;
HKEY
key
;
HKEY
key
=
NULL
;
LONG
rc
;
HANDLE
hsem
;
...
...
@@ -674,24 +674,28 @@ void CRYPT_ImportSystemRootCertsToReg(void)
}
if
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
)
{
WaitForSingleObject
(
hsem
,
INFINITE
);
else
goto
done
;
}
rc
=
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
Microsoft
\\
SystemCertificates
\\
Root
\\
Certificates"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
key
,
0
);
if
(
rc
)
goto
done
;
if
(
!
(
store
=
create_root_store
()))
{
if
((
store
=
create_root_store
()))
{
rc
=
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
L"Software
\\
Microsoft
\\
SystemCertificates
\\
Root
\\
Certificates"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
key
,
0
);
if
(
!
rc
)
{
if
(
!
CRYPT_SerializeContextsToReg
(
key
,
REG_OPTION_VOLATILE
,
pCertInterface
,
store
))
ERR
(
"Failed to import system certs into registry, %08lx
\n
"
,
GetLastError
());
RegCloseKey
(
key
);
}
CertCloseStore
(
store
,
0
);
}
else
ERR
(
"Failed to create root store
\n
"
);
ERR
(
"Failed to create root store
\n
"
);
goto
done
;
}
if
(
!
CRYPT_SerializeContextsToReg
(
key
,
REG_OPTION_VOLATILE
,
pCertInterface
,
store
))
ERR
(
"Failed to import system certs into registry, %08lx
\n
"
,
GetLastError
());
done:
RegCloseKey
(
key
);
CertCloseStore
(
store
,
0
);
root_certs_imported
=
TRUE
;
ReleaseSemaphore
(
hsem
,
1
,
NULL
);
CloseHandle
(
hsem
);
...
...
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