diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2018-08-17 17:39:01 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-08-18 15:46:23 +0200 |
commit | 4939f3652473c1519d2b604068efb87ef7531874 (patch) | |
tree | 2b538ce93d1edf5070abd297b29bee5a848c327b /lib/setopt.c | |
parent | c7ea4ddd2e5db304bc3170eeb8d5aa91f1921013 (diff) | |
download | curl-4939f3652473c1519d2b604068efb87ef7531874.tar.gz |
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/setopt.c')
-rw-r--r-- | lib/setopt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/setopt.c b/lib/setopt.c index 5ecf5b97f..5c5f4b381 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -1603,14 +1603,19 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, * String that holds the SSL crypto engine. */ argptr = va_arg(param, char *); - if(argptr && argptr[0]) - result = Curl_ssl_set_engine(data, argptr); + if(argptr && argptr[0]) { + result = Curl_setstropt(&data->set.str[STRING_SSL_ENGINE], argptr); + if(!result) { + result = Curl_ssl_set_engine(data, argptr); + } + } break; case CURLOPT_SSLENGINE_DEFAULT: /* * flag to set engine as default. */ + Curl_setstropt(&data->set.str[STRING_SSL_ENGINE], NULL); result = Curl_ssl_set_engine_default(data); break; case CURLOPT_CRLF: |