From 2c9763da3e5410415533d051ef40b0a24b376acb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Mar 2008 19:19:49 +0000 Subject: - Made setting the CURLOPT_SSL_CTX_FUNCTION option return a failure in case libcurl wasn't built to use OpenSSL as that is a prerequisite for this option to function! --- lib/url.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/url.c b/lib/url.c index 6b07f2e82..1dc51d189 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1769,6 +1769,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, */ data->set.ssl.verifyhost = va_arg(param, long); break; +#ifdef USE_SSLEAY + /* since these two options are only possible to use on an OpenSSL- + powered libcurl we #ifdef them on this condition so that libcurls + built against other SSL libs will return a proper error when trying + to set this option! */ case CURLOPT_SSL_CTX_FUNCTION: /* * Set a SSL_CTX callback @@ -1781,6 +1786,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, */ data->set.ssl.fsslctxp = va_arg(param, void *); break; +#endif case CURLOPT_CAINFO: /* * Set CA info for SSL connection. Specify file name of the CA certificate -- cgit v1.2.3