From 5e46fe15925c29732f5fdbc333e44c49564e082e Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Thu, 28 Jun 2018 16:20:53 -0700 Subject: [PATCH] Fix compilation for deprecated API on macOS Mojave preview (#30716) * Fix compilation for deprecated API on macOS Mojave preview Fixes: #30599 * Fixing tests on macOS Mojave --- .../System.Security.Cryptography.Native.Apple/CMakeLists.txt | 3 +++ .../System.Security.Cryptography.Native.Apple/pal_x509chain.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Native/Unix/System.Security.Cryptography.Native.Apple/CMakeLists.txt b/src/Native/Unix/System.Security.Cryptography.Native.Apple/CMakeLists.txt index fcb96e1a4509..8feda36e523b 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native.Apple/CMakeLists.txt +++ b/src/Native/Unix/System.Security.Cryptography.Native.Apple/CMakeLists.txt @@ -25,6 +25,9 @@ set(NATIVECRYPTO_SOURCES pal_x509chain.c ) +# Temporary workaround for dotnet/corefx issue #30599 +add_compile_options(-Wno-deprecated-declarations) + add_library(System.Security.Cryptography.Native.Apple SHARED ${NATIVECRYPTO_SOURCES} diff --git a/src/Native/Unix/System.Security.Cryptography.Native.Apple/pal_x509chain.c b/src/Native/Unix/System.Security.Cryptography.Native.Apple/pal_x509chain.c index a2133fe5a021..5be21d0455cc 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native.Apple/pal_x509chain.c +++ b/src/Native/Unix/System.Security.Cryptography.Native.Apple/pal_x509chain.c @@ -186,7 +186,7 @@ static void MergeStatusCodes(CFTypeRef key, CFTypeRef value, void* context) // It doesn't represent a new error code, and we're still getting the old ones, so // just ignore it for now. } - else if (CFEqual(keyString, CFSTR("NonEmptySubject"))) + else if (CFEqual(keyString, CFSTR("NonEmptySubject")) || CFEqual(keyString, CFSTR("GrayListedKey"))) { // Not a "problem" that we report. }