]> granicus.if.org Git - curl/commitdiff
darwinssl: fix iOS build
authorChris Araman <chris-araman@users.noreply.github.com>
Fri, 23 Dec 2016 02:27:17 +0000 (18:27 -0800)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 27 Dec 2016 21:07:28 +0000 (22:07 +0100)
Reviewed-by: Nick Zitzmann
Fixes #1172

lib/vtls/darwinssl.c

index a43e391258988a84a6819f9bfe0b99564ebb4485..2146b562df0beca812cb28f2708726345fea7f9a 100644 (file)
@@ -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);