tool_operate: only set SSH related libcurl options for SSH URLs

For example, this avoids trying to find and set the known_hosts file (or
warn for its absence) if SFTP or SCP are not used.

Closes #8040
This commit is contained in:
Daniel Stenberg 2021-11-21 15:52:58 +01:00
parent 3f8fde366f
commit 18270893ab
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 83 additions and 36 deletions

View file

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -29,5 +29,6 @@ extern curl_version_info_data *curlinfo;
extern long built_in_protos;
CURLcode get_libcurl_info(void);
long scheme2protocol(const char *scheme);
#endif /* HEADER_CURL_TOOL_LIBINFO_H */