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
c53d6a4a
Commit
c53d6a4a
authored
Jan 25, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Also import user/admin defined root certificates on macOS.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2129e335
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
unixlib.c
dlls/crypt32/unixlib.c
+14
-5
No files found.
dlls/crypt32/unixlib.c
View file @
c53d6a4a
...
...
@@ -580,15 +580,23 @@ static void load_root_certs(void)
DWORD
i
;
#ifdef HAVE_SECURITY_SECURITY_H
const
SecTrustSettingsDomain
domains
[]
=
{
kSecTrustSettingsDomainSystem
,
kSecTrustSettingsDomainAdmin
,
kSecTrustSettingsDomainUser
};
OSStatus
status
;
CFArrayRef
rootCerts
;
CFArrayRef
certs
;
DWORD
domain
;
status
=
SecTrustCopyAnchorCertificates
(
&
rootCerts
);
for
(
domain
=
0
;
domain
<
ARRAY_SIZE
(
domains
);
domain
++
)
{
status
=
SecTrustSettingsCopyCertificates
(
domains
[
domain
],
&
certs
);
if
(
status
==
noErr
)
{
for
(
i
=
0
;
i
<
CFArrayGetCount
(
rootC
erts
);
i
++
)
for
(
i
=
0
;
i
<
CFArrayGetCount
(
c
erts
);
i
++
)
{
SecCertificateRef
cert
=
(
SecCertificateRef
)
CFArrayGetValueAtIndex
(
rootC
erts
,
i
);
SecCertificateRef
cert
=
(
SecCertificateRef
)
CFArrayGetValueAtIndex
(
c
erts
,
i
);
CFDataRef
certData
;
if
((
status
=
SecKeychainItemExport
(
cert
,
kSecFormatX509Cert
,
0
,
NULL
,
&
certData
))
==
noErr
)
{
...
...
@@ -599,7 +607,8 @@ static void load_root_certs(void)
else
WARN
(
"could not export certificate %d to X509 format: 0x%08x
\n
"
,
i
,
(
unsigned
int
)
status
);
}
CFRelease
(
rootCerts
);
CFRelease
(
certs
);
}
}
#endif
...
...
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