aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_darwinssl.c
diff options
context:
space:
mode:
authorNick Zitzmann <nickzman@gmail.com>2013-11-12 20:18:04 -0600
committerNick Zitzmann <nickzman@gmail.com>2013-11-12 20:18:04 -0600
commitbf77101e5c132572a7abeeec1ae8b3b0174d2831 (patch)
tree117c250af72a8d095fe1a09e2e06331faad279ce /lib/curl_darwinssl.c
parent2ea9a125a645359968b3a1e556e0d4dedc1eb904 (diff)
darwinssl: PKCS#12 import feature now requires Lion or later
It turns out that some of the constants necessary to make this feature work are missing from Snow Leopard's Security framework even though they are defined in the headers. Bug: http://curl.haxx.se/mail/lib-2013-11/0076.html Reported by: myriachan
Diffstat (limited to 'lib/curl_darwinssl.c')
-rw-r--r--lib/curl_darwinssl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/curl_darwinssl.c b/lib/curl_darwinssl.c
index 45a668bdd..25cf3d14d 100644
--- a/lib/curl_darwinssl.c
+++ b/lib/curl_darwinssl.c
@@ -938,8 +938,10 @@ static OSStatus CopyIdentityFromPKCS12File(const char *cPath,
cPassword, kCFStringEncodingUTF8) : NULL;
CFDataRef pkcs_data = NULL;
- /* We can import P12 files on iOS or OS X 10.6 or later: */
-#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
+ /* We can import P12 files on iOS or OS X 10.7 or later: */
+ /* These constants are documented as having first appeared in 10.6 but they
+ raise linker errors when used on that cat for some reason. */
+#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
if(CFURLCreateDataAndPropertiesFromResource(NULL, pkcs_url, &pkcs_data,
NULL, NULL, &status)) {
const void *cKeys[] = {kSecImportExportPassphrase};
@@ -963,7 +965,7 @@ static OSStatus CopyIdentityFromPKCS12File(const char *cPath,
CFRelease(options);
CFRelease(pkcs_data);
}
-#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
+#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */
if(password)
CFRelease(password);
CFRelease(pkcs_url);