aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-07-22 22:49:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-07-22 22:49:01 +0000
commit47c392e135f17d400acc5d7e99b88d16578cb406 (patch)
treee4069b5c9fa7582f53ff88eb8c08f86d43f8ea55 /src
parent9cff716925d8501992a10f09a53d4ad3ed3d919f (diff)
- Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA.
They introduce known_host support for SSH keys to libcurl. See docs for details.
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 10 insertions, 0 deletions
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 */