summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-10 11:51:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-10 15:33:51 +0200
commit6f63ab41b2949ad9819efb0f585122b880cd55ba (patch)
tree0b0bed74a9ee0258ac38d7922ba773db8a2bb04d /src
parent54fa68bf4468a07cb9a1cc672052bdd6df840512 (diff)
downloadcurl-6f63ab41b2949ad9819efb0f585122b880cd55ba.tar.gz
tool_operate: only set CURLOPT_SSL_OPTIONS if SSL support is present
Reported-by: Marcel Raad Follow-up to 148534db5 Fixes #5367 Closes #5369
Diffstat (limited to 'src')
-rw-r--r--src/tool_operate.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 81ee7c136..66c6468bc 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1589,7 +1589,25 @@ static CURLcode single_transfer(struct GlobalConfig *global,
config->ssl_version | config->ssl_version_max);
my_setopt_enum(curl, CURLOPT_PROXY_SSLVERSION,
config->proxy_ssl_version);
+
+ {
+ long mask =
+ (config->ssl_allow_beast ? CURLSSLOPT_ALLOW_BEAST : 0) |
+ (config->ssl_revoke_best_effort ?
+ CURLSSLOPT_REVOKE_BEST_EFFORT : 0) |
+ (config->native_ca_store ?
+ CURLSSLOPT_NATIVE_CA : 0) |
+ (config->ssl_no_revoke ? CURLSSLOPT_NO_REVOKE : 0);
+
+ if(mask)
+ my_setopt_bitmask(curl, CURLOPT_SSL_OPTIONS, mask);
+ }
+
+ if(config->proxy_ssl_allow_beast)
+ my_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
+ (long)CURLSSLOPT_ALLOW_BEAST);
}
+
if(config->path_as_is)
my_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
@@ -1900,23 +1918,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
my_setopt_str(curl, CURLOPT_GSSAPI_DELEGATION,
config->gssapi_delegation);
- /* new in 7.25.0, 7.44.0 and 7.70.0 */
- {
- long mask = (config->ssl_allow_beast ? CURLSSLOPT_ALLOW_BEAST : 0) |
- (config->ssl_revoke_best_effort ?
- CURLSSLOPT_REVOKE_BEST_EFFORT : 0) |
- (config->native_ca_store ?
- CURLSSLOPT_NATIVE_CA : 0) |
- (config->ssl_no_revoke ? CURLSSLOPT_NO_REVOKE : 0);
-
- if(mask)
- my_setopt_bitmask(curl, CURLOPT_SSL_OPTIONS, mask);
- }
-
- if(config->proxy_ssl_allow_beast)
- my_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
- (long)CURLSSLOPT_ALLOW_BEAST);
-
if(config->mail_auth)
my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth);