[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 224/256: metalink: fix NSS issue in MultiSSL builds
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 224/256: metalink: fix NSS issue in MultiSSL builds |
Date: |
Fri, 06 Oct 2017 19:45:15 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit de47158934075322cb8fd0e681ddb7d6e50b40a7
Author: Viktor Szakats <address@hidden>
AuthorDate: Tue Sep 12 18:14:00 2017 +0000
metalink: fix NSS issue in MultiSSL builds
In MultiSSL mode (i.e. when more than one SSL backend is compiled
in), we cannot use the compile time flag `USE_NSS` as indicator that
the NSS backend is in use. As far as Metalink is concerned, the SSL
backend is only used for MD5, SHA-1 and SHA-256 calculations,
therefore one of the available SSL backends is selected at compile
time, in a strict order of preference.
Let's introduce a new `HAVE_NSS_CONTEXT` constant that can be used
to determine whether the SSL backend used for Metalink is the NSS
backend, and use that to guard the code that wants to de-initialize
the NSS-specific data structure.
Ref: https://github.com/curl/curl/pull/1848
---
src/tool_metalink.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 8a8c66cff..270345547 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -30,6 +30,8 @@
# include <fcntl.h>
#endif
+#undef HAVE_NSS_CONTEXT
+
#ifdef USE_OPENSSL
# include <openssl/md5.h>
# include <openssl/sha.h>
@@ -50,6 +52,7 @@
# define MD5_CTX void *
# define SHA_CTX void *
# define SHA256_CTX void *
+# define HAVE_NSS_CONTEXT
static NSSInitContext *nss_context;
#elif defined(USE_POLARSSL)
# include <polarssl/md5.h>
@@ -967,7 +970,7 @@ void clean_metalink(struct OperationConfig *config)
void metalink_cleanup(void)
{
-#ifdef USE_NSS
+#ifdef HAVE_NSS_CONTEXT
if(nss_context) {
NSS_ShutdownContext(nss_context);
nss_context = NULL;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 219/256: vtls: provide curl_global_sslset() even in non-SSL builds, (continued)
- [GNUnet-SVN] [gnurl] 219/256: vtls: provide curl_global_sslset() even in non-SSL builds, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 217/256: openssl: only verify RSA private key if supported, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 59/256: darwinssl: handle long strings in TLS certs, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 73/256: schannel: reorder functions topologically, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 69/256: vtls: move sha256sum into the Curl_ssl struct, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 195/256: rtsp: Segfault in rtsp.c when using WRITEDATA, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 253/256: build-openssl.bat: Warn OpenSSL 1.1.0 not yet supported, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 30/256: metalink: adjust source code style, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 149/256: docs/curl_mime_*.3: added examples, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 93/256: configure: allow setting the default SSL backend, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 224/256: metalink: fix NSS issue in MultiSSL builds,
gnunet <=
- [GNUnet-SVN] [gnurl] 198/256: non-ascii: use iconv() with 'char **' argument, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 136/256: RELEASE-NOTES: synced with 1ab9e9b50, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 189/256: code style: remove wrong uses of multiple spaces, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 166/256: travis: add c-ares enabled builds linux + osx, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 237/256: cookie: fix memory leak on oversized rejection, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 212/256: smtp: fix memory leak in OOM, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 254/256: THANKS: added new 7.56.0 contributors, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 251/256: vtls: compare and clone ssl configs properly, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 203/256: socks: fix incorrect port number in SOCKS4 error message, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 138/256: curl.h: make the curl_strequal() protos use the same style, gnunet, 2017/10/06