Fix argument type in a call to SSLSetEnabledCiphers (#42543)
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 22 Sep 2020 08:44:08 +0000 (10:44 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Sep 2020 08:44:08 +0000 (10:44 +0200)
The latest version of macOS clang from XCode 12 beta complains about
data type of the 2nd argument passed to SSLSetEnabledCiphers.
This change fixes it by casting it to the actual argument type.

src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/pal_ssl.c

index 78497ce..ac0d06b 100644 (file)
@@ -594,7 +594,7 @@ int32_t AppleCryptoNative_SslSetEnabledCipherSuites(SSLContextRef sslContext, co
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
         // macOS
-        return SSLSetEnabledCiphers(sslContext, cipherSuites, (size_t)numCipherSuites);
+        return SSLSetEnabledCiphers(sslContext, (const SSLCipherSuite *)cipherSuites, (size_t)numCipherSuites);
 #pragma clang diagnostic pop   
     }
     else