From 45fc760985fa11ef98149418cbad02dadf748f31 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Jul 2003 16:29:23 +0000 Subject: Peter Sylvester's patch was applied that introduces the following: CURLOPT_SSL_CTX_FUNCTION to set a callback that gets called with the OpenSSL's ssl_ctx pointer passed in and allow a callback to act on it. If anything but CURLE_OK is returned, that will also be returned by libcurl all the way back. If this function changes the CURLOPT_URL, libcurl will detect this and instead go use the new URL. CURLOPT_SSL_CTX_DATA is a pointer you set to get passed to the callback set with CURLOPT_SSL_CTX_FUNCTION. --- lib/url.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 9ec92dfab..3b6a73b90 100644 --- a/lib/url.c +++ b/lib/url.c @@ -723,6 +723,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) } data->set.set_url = va_arg(param, char *); data->change.url = data->set.set_url; + data->change.url_changed = TRUE; break; case CURLOPT_PORT: /* @@ -1091,6 +1092,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) */ data->set.ssl.verifyhost = va_arg(param, long); break; + case CURLOPT_SSL_CTX_FUNCTION: + /* + * Set a SSL_CTX callback + */ + data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback); + break; + case CURLOPT_SSL_CTX_DATA: + /* + * Set a SSL_CTX callback parameter pointer + */ + data->set.ssl.fsslctxp = va_arg(param, void *); + break; case CURLOPT_CAINFO: /* * Set CA info for SSL connection. Specify file name of the CA certificate -- cgit v1.2.3