openssl: prevent recursive function calls from ctx callbacks

Follow the pattern of many other callbacks.

Ref: #4546
Closes #4585
This commit is contained in:
Daniel Stenberg 2019-11-11 11:45:12 +01:00
parent cbaaae44fe
commit 8686aab694
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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;