From: Daniel Stenberg Date: Mon, 11 Nov 2019 10:45:12 +0000 (+0100) Subject: openssl: prevent recursive function calls from ctx callbacks X-Git-Tag: curl-7_68_0~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8686aab69402ccad4bde0c2d73ec18e503ca11fd;p=thirdparty%2Fcurl.git openssl: prevent recursive function calls from ctx callbacks Follow the pattern of many other callbacks. Ref: #4546 Closes #4585 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 760758d234..26c8aa479b 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -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;