From 47c392e135f17d400acc5d7e99b88d16578cb406 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Jul 2009 22:49:01 +0000 Subject: - Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA. They introduce known_host support for SSH keys to libcurl. See docs for details. --- src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index 58e5bf960..aeaa58831 100644 --- a/src/main.c +++ b/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 */ -- cgit v1.2.3