aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-09-25 21:28:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-09-25 21:28:26 +0000
commitc18968718827979b6fdb71addf8d145c5ef64019 (patch)
treeecbf9299b9f2badc2694cca46ba1a55b89aa078a /lib/url.c
parent595016d3936306724e673c1ec8aa659b996928bd (diff)
allow setting CURLOPT_SSLENGINE to NULL even if no SSL engine is supported
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/url.c b/lib/url.c
index 9e915f4fa..611d938cf 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1125,12 +1125,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
/*
* String that holds the SSL crypto engine.
*/
-#ifdef HAVE_OPENSSL_ENGINE_H
{
const char *cpTemp = va_arg(param, char *);
- ENGINE *e;
if (cpTemp && cpTemp[0]) {
- e = ENGINE_by_id(cpTemp);
+#ifdef HAVE_OPENSSL_ENGINE_H
+ ENGINE *e = ENGINE_by_id(cpTemp);
if (e) {
if (data->engine) {
ENGINE_free(data->engine);
@@ -1141,12 +1140,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
failf(data, "SSL Engine '%s' not found", cpTemp);
return CURLE_SSL_ENGINE_NOTFOUND;
}
+#else
+ failf(data, "SSL Engine not supported");
+ return CURLE_SSL_ENGINE_NOTFOUND;
+#endif
}
}
break;
-#else
- return CURLE_SSL_ENGINE_NOTFOUND;
-#endif
+
case CURLOPT_SSLENGINE_DEFAULT:
/*
* flag to set engine as default.