From: Charles Davis cdavis5x@gmail.com
Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/crypt32/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c index dcfca5b1966b..702cccb56151 100644 --- a/dlls/crypt32/unixlib.c +++ b/dlls/crypt32/unixlib.c @@ -598,7 +598,7 @@ static void load_root_certs(void) { SecCertificateRef cert = (SecCertificateRef)CFArrayGetValueAtIndex(certs, i); CFDataRef certData; - if ((status = SecKeychainItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr) + if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr) { BYTE *data = add_cert( CFDataGetLength(certData) ); if (data) memcpy( data, CFDataGetBytePtr(certData), CFDataGetLength(certData) );
Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/secur32/schannel_macosx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/secur32/schannel_macosx.c b/dlls/secur32/schannel_macosx.c index d7453a448166..2f802f966862 100644 --- a/dlls/secur32/schannel_macosx.c +++ b/dlls/secur32/schannel_macosx.c @@ -1085,7 +1085,7 @@ static SECURITY_STATUS CDECL schan_get_session_peer_certificate(schan_session se for (i = 0; i < list->count; i++) { if (!(cert = (SecCertificateRef)CFArrayGetValueAtIndex(cert_array, i)) || - (SecKeychainItemExport(cert, kSecFormatX509Cert, 0, NULL, &data) != noErr)) + (SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &data) != noErr)) { WARN("Couldn't extract certificate data\n"); ret = SEC_E_INTERNAL_ERROR;
This function was introduced in 10.5, and we now require 10.8. We can safely assume it is present.
Signed-off-by: Chip Davis cdavis@codeweavers.com --- configure.ac | 5 ----- dlls/secur32/schannel_macosx.c | 16 ---------------- 2 files changed, 21 deletions(-)
diff --git a/configure.ac b/configure.ac index 76116f51fd71..71127a6067e9 100644 --- a/configure.ac +++ b/configure.ac @@ -790,11 +790,6 @@ case $host_os in if test "$ac_cv_header_Security_Security_h" = "yes" then AC_SUBST(SECURITY_LIBS,"-framework Security -framework CoreFoundation") - dnl Check for the SSLCopyPeerCertificates function - ac_save_LIBS="$LIBS" - LIBS="$LIBS $SECURITY_LIBS" - AC_CHECK_FUNCS(SSLCopyPeerCertificates) - LIBS="$ac_save_LIBS" fi if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" then diff --git a/dlls/secur32/schannel_macosx.c b/dlls/secur32/schannel_macosx.c index 2f802f966862..523f8c63562a 100644 --- a/dlls/secur32/schannel_macosx.c +++ b/dlls/secur32/schannel_macosx.c @@ -1047,13 +1047,6 @@ static SECURITY_STATUS CDECL schan_get_unique_channel_binding(schan_session sess return SEC_E_UNSUPPORTED_FUNCTION; }
-#ifndef HAVE_SSLCOPYPEERCERTIFICATES -static void cf_release(const void *arg, void *ctx) -{ - CFRelease(arg); -} -#endif - static SECURITY_STATUS CDECL schan_get_session_peer_certificate(schan_session session, struct schan_cert_list *list) { struct mac_session *s = (struct mac_session *)session; @@ -1068,11 +1061,7 @@ static SECURITY_STATUS CDECL schan_get_session_peer_certificate(schan_session se
TRACE("(%p/%p, %p)\n", s, s->context, list);
-#ifdef HAVE_SSLCOPYPEERCERTIFICATES status = SSLCopyPeerCertificates(s->context, &cert_array); -#else - status = SSLGetPeerCertificates(s->context, &cert_array); -#endif if (status != noErr || !cert_array) { WARN("SSLCopyPeerCertificates failed: %d\n", status); @@ -1118,11 +1107,6 @@ static SECURITY_STATUS CDECL schan_get_session_peer_certificate(schan_session se CFRelease(data); }
-done: -#ifndef HAVE_SSLCOPYPEERCERTIFICATES - /* This is why SSLGetPeerCertificates was deprecated */ - CFArrayApplyFunction(cert_array, CFRangeMake(0, CFArrayGetCount(cert_array)), cf_release, NULL); -#endif CFRelease(cert_array); return ret; }