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
39214543
Commit
39214543
authored
Nov 20, 2009
by
Ken Thomases
Committed by
Alexandre Julliard
Nov 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Read trusted root certificates from system keychain on Mac OS X.
parent
ff57ba9d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
Makefile.in
dlls/crypt32/Makefile.in
+1
-0
rootstore.c
dlls/crypt32/rootstore.c
+32
-0
No files found.
dlls/crypt32/Makefile.in
View file @
39214543
...
...
@@ -6,6 +6,7 @@ VPATH = @srcdir@
MODULE
=
crypt32.dll
IMPORTLIB
=
crypt32
IMPORTS
=
user32 advapi32 kernel32 ntdll
EXTRALIBS
=
@SECURITYLIB@
C_SRCS
=
\
base64.c
\
...
...
dlls/crypt32/rootstore.c
View file @
39214543
...
...
@@ -40,6 +40,9 @@
#include "winternl.h"
#include "wine/debug.h"
#include "crypt32_private.h"
#ifdef __APPLE__
#include <Security/Security.h>
#endif
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
...
...
@@ -713,6 +716,35 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store)
DWORD
i
;
BOOL
ret
=
FALSE
;
#ifdef __APPLE__
OSStatus
status
;
CFArrayRef
rootCerts
;
status
=
SecTrustCopyAnchorCertificates
(
&
rootCerts
);
if
(
status
==
noErr
)
{
int
i
;
for
(
i
=
0
;
i
<
CFArrayGetCount
(
rootCerts
);
i
++
)
{
SecCertificateRef
cert
=
(
SecCertificateRef
)
CFArrayGetValueAtIndex
(
rootCerts
,
i
);
CFDataRef
certData
;
if
((
status
=
SecKeychainItemExport
(
cert
,
kSecFormatX509Cert
,
0
,
NULL
,
&
certData
))
==
noErr
)
{
if
(
CertAddEncodedCertificateToStore
(
store
,
X509_ASN_ENCODING
,
CFDataGetBytePtr
(
certData
),
CFDataGetLength
(
certData
),
CERT_STORE_ADD_NEW
,
NULL
))
ret
=
TRUE
;
else
WARN
(
"adding root cert %d failed: %08x
\n
"
,
i
,
GetLastError
());
CFRelease
(
certData
);
}
else
WARN
(
"could not export certificate %d to X509 format: 0x%08x
\n
"
,
i
,
(
unsigned
int
)
status
);
}
CFRelease
(
rootCerts
);
}
#endif
for
(
i
=
0
;
!
ret
&&
i
<
sizeof
(
CRYPT_knownLocations
)
/
sizeof
(
CRYPT_knownLocations
[
0
]);
i
++
)
...
...
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