a6f08c
From 9ea407a0476d22cde575826c18b5aa56b57ac9b4 Mon Sep 17 00:00:00 2001
a6f08c
From: =?UTF-8?q?Felix=20H=C3=A4dicke?= <felixhaedicke@web.de>
a6f08c
Date: Wed, 23 Jan 2019 23:10:39 +0100
a6f08c
Subject: [PATCH] setopt: enable CURLOPT_SSH_KNOWNHOSTS and
a6f08c
 CURLOPT_SSH_KEYFUNCTION for libssh
a6f08c
a6f08c
CURLOPT_SSH_KNOWNHOSTS and CURLOPT_SSH_KEYFUNCTION are supported for
a6f08c
libssh as well. So accepting these options only when compiling with
a6f08c
libssh2 is wrong here.
a6f08c
a6f08c
Fixes #3493
a6f08c
Closes #3494
a6f08c
a6f08c
Upstream-commit: 3cbf731d9ec7146f9f1a6ac0fbd9af7fe358f5bb
a6f08c
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
a6f08c
---
a6f08c
 lib/setopt.c | 3 +--
a6f08c
 1 file changed, 1 insertion(+), 2 deletions(-)
a6f08c
a6f08c
diff --git a/lib/setopt.c b/lib/setopt.c
a6f08c
index b07ccfe..88a05ff 100644
a6f08c
--- a/lib/setopt.c
a6f08c
+++ b/lib/setopt.c
a6f08c
@@ -2208,7 +2208,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
a6f08c
     result = Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5],
a6f08c
                             va_arg(param, char *));
a6f08c
     break;
a6f08c
-#ifdef HAVE_LIBSSH2_KNOWNHOST_API
a6f08c
+
a6f08c
   case CURLOPT_SSH_KNOWNHOSTS:
a6f08c
     /*
a6f08c
      * Store the file name to read known hosts from.
a6f08c
@@ -2229,7 +2229,6 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
a6f08c
      */
a6f08c
     data->set.ssh_keyfunc_userp = va_arg(param, void *);
a6f08c
     break;
a6f08c
-#endif /* HAVE_LIBSSH2_KNOWNHOST_API */
a6f08c
 #endif /* USE_LIBSSH2 */
a6f08c
 
a6f08c
   case CURLOPT_HTTP_TRANSFER_DECODING:
a6f08c
-- 
a6f08c
2.34.1
a6f08c