]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sectransp: check for a function defined when __BLOCKS__ is undefined
authorNick Zitzmann <nickzman@gmail.com>
Sun, 15 May 2022 21:57:20 +0000 (16:57 -0500)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 16 May 2022 16:15:04 +0000 (18:15 +0200)
SecTrustEvaluateAsync() is defined in the macOS 10.7 SDK, but it
requires Grand Central Dispatch to be supported by the compiler, and
some third-party macOS compilers do not support Grand Central Dispatch.
SecTrustCopyPublicKey() is not present in macOS 10.6, so this shouldn't
adversely affect anything.

Fixes #8846
Reported-by: Egor Pugin
Closes #8854

lib/vtls/sectransp.c

index 2e57d837852fbd7e795b4b8cad714316483972c1..f0f457a5acfadd28d7a237a39e6f95a078fa1a10 100644 (file)
@@ -2964,7 +2964,7 @@ collect_server_cert(struct Curl_easy *data,
      private API and doesn't work as expected. So we have to look for
      a different symbol to make sure this code is only executed under
      Lion or later. */
-  if(SecTrustEvaluateAsync) {
+  if(SecTrustCopyPublicKey) {
 #pragma unused(server_certs)
     err = SSLCopyPeerTrust(backend->ssl_ctx, &trust);
     /* For some reason, SSLCopyPeerTrust() can return noErr and yet return