]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: prevent recursive function calls from ctx callbacks
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Nov 2019 10:45:12 +0000 (11:45 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 12 Nov 2019 08:40:00 +0000 (09:40 +0100)
Follow the pattern of many other callbacks.

Ref: #4546
Closes #4585

lib/vtls/openssl.c

index 760758d234af7c843e6dc1a873ab99788fe068fd..26c8aa479b8b7cc0f40ebcf683c7493924fa2c0d 100644 (file)
@@ -2806,8 +2806,10 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
 
   /* give application a chance to interfere with SSL set up. */
   if(data->set.ssl.fsslctx) {
+    Curl_set_in_callback(data, true);
     result = (*data->set.ssl.fsslctx)(data, BACKEND->ctx,
                                       data->set.ssl.fsslctxp);
+    Curl_set_in_callback(data, false);
     if(result) {
       failf(data, "error signaled by ssl ctx callback");
       return result;