aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Araman <chris-araman@users.noreply.github.com>2016-12-22 18:27:17 -0800
committerDaniel Stenberg <daniel@haxx.se>2016-12-27 22:07:28 +0100
commit8db3afe16c0916ea5acf6aed6e7cf02f06cc8677 (patch)
treed9820c555bc72b7d51799a66204ce4b04fa48ae7 /lib
parentaa6db9642e8044a14ccffa31b4933463d9c02ff0 (diff)
darwinssl: fix iOS build
Reviewed-by: Nick Zitzmann Fixes #1172
Diffstat (limited to 'lib')
-rw-r--r--lib/vtls/darwinssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
index a43e39125..2146b562d 100644
--- a/lib/vtls/darwinssl.c
+++ b/lib/vtls/darwinssl.c
@@ -936,7 +936,11 @@ static OSStatus CopyIdentityWithLabel(char *label,
(SecIdentityRef) CFArrayGetValueAtIndex(keys_list, i);
err = SecIdentityCopyCertificate(*out_cert_and_key, &cert);
if(err == noErr) {
+#if CURL_BUILD_IOS
+ common_name = SecCertificateCopySubjectSummary(cert);
+#else // CURL_BUILD_MAC_10_7
SecCertificateCopyCommonName(cert, &common_name);
+#endif
if(CFStringCompare(common_name, label_cf, 0) == kCFCompareEqualTo) {
CFRelease(cert);
CFRelease(common_name);