runtime: Build on macOS Mojave DP fails

Unfortunately the SecCertificateCopyPublicKey API has been deprecated and causes build failure due to the following warning (and -Werror):

/Users/filipnavara/Documents/GitHub/corefx/src/Native/Unix/System.Security.Cryptography.Native.Apple/pal_x509.c:55:21: error: 
      'SecCertificateCopyPublicKey' is deprecated: first deprecated in macOS 10.14
      [-Werror,-Wdeprecated-declarations]
    *pOSStatusOut = SecCertificateCopyPublicKey(cert, pPublicKeyOut);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                    SecCertificateCopyKey
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h:180:10: note: 
      'SecCertificateCopyPublicKey' has been explicitly marked deprecated here
OSStatus SecCertificateCopyPublicKey(SecCertificateRef certificate, SecKeyRef * __n...
         ^
1 error generated.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@bartonjs what about the other three codes noted above pulled from Apple sources? Do we need to add those in case they appear in some case we don’t test yet?