[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 226/264: multi-ssl: reset the SSL backend on `Curl_global_cleanu
From: |
gnunet |
Subject: |
[gnurl] 226/264: multi-ssl: reset the SSL backend on `Curl_global_cleanup()` |
Date: |
Thu, 30 Apr 2020 16:08:49 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit ff7a3107ed7f46bca8d1b4f989b1a83cd6e47adf
Author: Johannes Schindelin <address@hidden>
AuthorDate: Fri Apr 17 23:04:14 2020 +0200
multi-ssl: reset the SSL backend on `Curl_global_cleanup()`
When cURL is compiled with support for multiple SSL backends, it is
possible to configure an SSL backend via `curl_global_sslset()`, but
only *before* `curl_global_init()` was called.
If another SSL backend should be used after that, a user might be
tempted to call `curl_global_cleanup()` to start over. However, we did
not foresee that use case and forgot to reset the SSL backend in that
cleanup.
Let's allow that use case.
Fixes #5255
Closes #5257
Reported-by: davidedec on github
Signed-off-by: Johannes Schindelin <address@hidden>
---
lib/vtls/vtls.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index badd93d08..f1b525227 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -174,6 +174,9 @@ int Curl_ssl_init(void)
return Curl_ssl->init();
}
+#if defined(CURL_WITH_MULTI_SSL)
+static const struct Curl_ssl Curl_ssl_multi;
+#endif
/* Global cleanup */
void Curl_ssl_cleanup(void)
@@ -181,6 +184,9 @@ void Curl_ssl_cleanup(void)
if(init_ssl) {
/* only cleanup if we did a previous init */
Curl_ssl->cleanup();
+#if defined(CURL_WITH_MULTI_SSL)
+ Curl_ssl = &Curl_ssl_multi;
+#endif
init_ssl = FALSE;
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 92/264: KNOWN_BUGS: DoH leaks memory after followlocation, (continued)
- [gnurl] 92/264: KNOWN_BUGS: DoH leaks memory after followlocation, gnunet, 2020/04/30
- [gnurl] 98/264: SECURITY.md: minor rephrase, gnunet, 2020/04/30
- [gnurl] 125/264: appveyor: turn disabled tests into ignored result tests, gnunet, 2020/04/30
- [gnurl] 130/264: lib: never define CURL_CA_BUNDLE with a getenv, gnunet, 2020/04/30
- [gnurl] 127/264: appveyor: sort builds by type and add two new variants, gnunet, 2020/04/30
- [gnurl] 134/264: RELEASE-NOTES: synced, gnunet, 2020/04/30
- [gnurl] 103/264: memdebug: don't log free(NULL), gnunet, 2020/04/30
- [gnurl] 138/264: cleanup: correct copyright year range on a few files, gnunet, 2020/04/30
- [gnurl] 131/264: TODO: Option to make -Z merge lined based outputs on stdout, gnunet, 2020/04/30
- [gnurl] 104/264: build: fixed build for systems with select() in unistd.h, gnunet, 2020/04/30
- [gnurl] 226/264: multi-ssl: reset the SSL backend on `Curl_global_cleanup()`,
gnunet <=
- [gnurl] 227/264: tests: run the SOCKS test server on a dynamic port number, gnunet, 2020/04/30
- [gnurl] 223/264: runtests: always put test number in servercmd file, gnunet, 2020/04/30
- [gnurl] 205/264: tests: make 2006-2010 handle different port number lengths, gnunet, 2020/04/30
- [gnurl] 235/264: mqtt: make NOSTATE get within the debug name array, gnunet, 2020/04/30
- [gnurl] 233/264: tests: add %NOLISTENPORT and use it, gnunet, 2020/04/30
- [gnurl] 234/264: tests: run the RTSP test server on a dynamic port number, gnunet, 2020/04/30
- [gnurl] 232/264: mqtt: remove code with no purpose, gnunet, 2020/04/30
- [gnurl] 231/264: mqtt: fix Curl_read() error handling while reading remaining length, gnunet, 2020/04/30
- [gnurl] 247/264: tests/git: ignore mqttd and port files, gnunet, 2020/04/30
- [gnurl] 248/264: docs: fix two typos, gnunet, 2020/04/30