aboutsummaryrefslogtreecommitdiff
path: root/lib/easy.c
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2018-08-17 17:39:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-08-18 15:46:23 +0200
commit4939f3652473c1519d2b604068efb87ef7531874 (patch)
tree2b538ce93d1edf5070abd297b29bee5a848c327b /lib/easy.c
parentc7ea4ddd2e5db304bc3170eeb8d5aa91f1921013 (diff)
vtls: reinstantiate engine on duplicated handles
Handles created with curl_easy_duphandle do not use the SSL engine set up in the original handle. This fixes the issue by storing the engine name in the internal url state and setting the engine from its name inside curl_easy_duphandle. Reported-by: Anton Gerasimov Signed-of-by: Laurent Bonnans Fixes #2829 Closes #2833
Diffstat (limited to 'lib/easy.c')
-rw-r--r--lib/easy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 5af90e326..027d0bef3 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -958,6 +958,13 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
outcurl->change.referer_alloc = TRUE;
}
+ /* Reinitialize an SSL engine for the new handle
+ * note: the engine name has already been copied by dupset */
+ if(outcurl->set.str[STRING_SSL_ENGINE]) {
+ if(Curl_ssl_set_engine(outcurl, outcurl->set.str[STRING_SSL_ENGINE]))
+ goto fail;
+ }
+
/* Clone the resolver handle, if present, for the new handle */
if(Curl_resolver_duphandle(&outcurl->state.resolver,
data->state.resolver))