curl-library
[PATCH 3/3] darwinssl: Fix #if 10.6.0 for SecKeychainSearch
From: Melissa Mears <myriachan_at_cox.net>
Date: Tue, 3 Dec 2013 16:07:32 -0800
Date: Tue, 3 Dec 2013 16:07:32 -0800
The comment here says that SecKeychainSearch causes a deprecation
warning when used with a minimum Mac OS X SDK version of 10.7.0, which
is correct. However, the #if guard did not match. It was intended to
only use the code if 10.6.0 support was enabled, but it had 10.7.0
instead. This caused a warning if the minimum was exactly 10.7.0.
--- lib/curl_darwinssl.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/curl_darwinssl.c b/lib/curl_darwinssl.c index 78b5200..7022a47 100644 --- a/lib/curl_darwinssl.c +++ b/lib/curl_darwinssl.c @@ -834,7 +834,7 @@ CF_INLINE CFStringRef CopyCertSubject(SecCertificateRef cert) return server_cert_summary; } -#if CURL_SUPPORT_MAC_10_7 +#if CURL_SUPPORT_MAC_10_6 /* The SecKeychainSearch API was deprecated in Lion, and using it will raise deprecation warnings, so let's not compile this unless it's necessary: */ static OSStatus CopyIdentityWithLabelOldSchool(char *label, @@ -874,7 +874,7 @@ static OSStatus CopyIdentityWithLabelOldSchool(char *label, CFRelease(search); return status; } -#endif /* CURL_SUPPORT_MAC_10_7 */ +#endif /* CURL_SUPPORT_MAC_10_6 */ static OSStatus CopyIdentityWithLabel(char *label, SecIdentityRef *out_cert_and_key) @@ -914,12 +914,12 @@ static OSStatus CopyIdentityWithLabel(char *label, CFRelease(query_dict); } else { -#if CURL_SUPPORT_MAC_10_7 +#if CURL_SUPPORT_MAC_10_6 /* On Leopard and Snow Leopard, fall back to SecKeychainSearch. */ status = CopyIdentityWithLabelOldSchool(label, out_cert_and_key); #endif /* CURL_SUPPORT_MAC_10_7 */ } -#elif CURL_SUPPORT_MAC_10_7 +#elif CURL_SUPPORT_MAC_10_6 /* For developers building on older cats, we have no choice but to fall back to SecKeychainSearch. */ status = CopyIdentityWithLabelOldSchool(label, out_cert_and_key); -- 1.7.1 ------=_Part_7185602_2084823767.1386116568140 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html ------=_Part_7185602_2084823767.1386116568140--Received on 2001-09-17