mirror of
https://github.com/curl/curl.git
synced 2026-08-26 07:53:31 +03:00
- Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA.
They introduce known_host support for SSH keys to libcurl. See docs for details.
This commit is contained in:
parent
9cff716925
commit
47c392e135
9 changed files with 311 additions and 14 deletions
10
src/main.c
10
src/main.c
|
|
@ -4694,6 +4694,16 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
|
||||
}
|
||||
else {
|
||||
char *home = homedir();
|
||||
char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
|
||||
if(home && file) {
|
||||
free(home);
|
||||
my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
|
||||
}
|
||||
else
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if(config->no_body || config->remote_time) {
|
||||
/* no body or use remote time */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue