diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2015-07-25 16:32:15 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2015-07-25 16:32:15 -0400 |
commit | b46a7744bcdc37411346566872bf19baa5f8c4e3 (patch) | |
tree | 006edd04b4d8b6abbfba53084180d1476fa3a31c /src | |
parent | a284b0ebc4c4572fcbb69df9783a4049ace3e6ec (diff) |
tool_operate: Fix CURLOPT_SSL_OPTIONS for builds without HTTPS
- Set CURLOPT_SSL_OPTIONS only if the tool enabled an SSL option.
Broken by me several days ago in 172b2be.
https://github.com/bagder/curl/commit/172b2be#diff-70b44ee478e58d4e1ddcf9c9a73d257b
Bug: http://curl.haxx.se/mail/lib-2015-07/0119.html
Reported-by: Dan Fandrich
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operate.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 1180555fa..ed4071ade 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1328,9 +1328,12 @@ static CURLcode operate_do(struct GlobalConfig *global, config->gssapi_delegation); /* new in 7.25.0 */ - my_setopt_bitmask(curl, CURLOPT_SSL_OPTIONS, - (long)((config->ssl_allow_beast ? CURLSSLOPT_ALLOW_BEAST : 0) | - (config->ssl_no_revoke ? CURLSSLOPT_NO_REVOKE : 0))); + { + long mask = (config->ssl_allow_beast ? CURLSSLOPT_ALLOW_BEAST : 0) | + (config->ssl_no_revoke ? CURLSSLOPT_NO_REVOKE : 0); + if(mask) + my_setopt_bitmask(curl, CURLOPT_SSL_OPTIONS, mask); + } if(config->mail_auth) my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth); |