]> granicus.if.org Git - curl/commitdiff
nss: support using libnss on macOS
authorDaniel Gustafsson <daniel@yesql.se>
Wed, 19 Jun 2019 20:28:20 +0000 (22:28 +0200)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 7 Jul 2019 03:40:21 +0000 (23:40 -0400)
The file suffix for dynamically loadable objects on macOS is .dylib,
which need to be added for the module definitions in order to get the
NSS TLS backend to work properly on macOS.

Closes https://github.com/curl/curl/pull/4046

lib/vtls/nss.c

index 5e0cd2414c65982e6c9a04cb4c49d167f6c32e82..85b851ff8de0f40e1c3a17455b28ebab628abae5 100644 (file)
@@ -223,9 +223,12 @@ static const cipher_s cipherlist[] = {
 #endif
 };
 
-#ifdef WIN32
+#if defined(WIN32)
 static const char *pem_library = "nsspem.dll";
 static const char *trust_library = "nssckbi.dll";
+#elif defined(__APPLE__)
+static const char *pem_library = "libnsspem.dylib";
+static const char *trust_library = "libnssckbi.dylib";
 #else
 static const char *pem_library = "libnsspem.so";
 static const char *trust_library = "libnssckbi.so";