Skip to content

Commit

Permalink
tool_operate: Fix CURLOPT_SSL_OPTIONS for builds without HTTPS
Browse files Browse the repository at this point in the history
- Set CURLOPT_SSL_OPTIONS only if the tool enabled an SSL option.

Broken by me several days ago in 172b2be.
172b2be#diff-70b44ee478e58d4e1ddcf9c9a73d257b

Bug: http://curl.haxx.se/mail/lib-2015-07/0119.html
Reported-by: Dan Fandrich
  • Loading branch information
jay committed Jul 25, 2015
1 parent a284b0e commit b46a774
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tool_operate.c
Expand Up @@ -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);
Expand Down

0 comments on commit b46a774

Please sign in to comment.