Unverified Commit 3cbf731d authored by Felix Hädicke's avatar Felix Hädicke Committed by Daniel Stenberg
Browse files

setopt: enable CURLOPT_SSH_KNOWNHOSTS and CURLOPT_SSH_KEYFUNCTION for libssh

CURLOPT_SSH_KNOWNHOSTS and CURLOPT_SSH_KEYFUNCTION are supported for
libssh as well. So accepting these options only when compiling with
libssh2 is wrong here.

Fixes #3493
Closes #3494
parent 15c94b31
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -2237,7 +2237,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
    result = Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5],
    result = Curl_setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5],
                            va_arg(param, char *));
                            va_arg(param, char *));
    break;
    break;
#ifdef HAVE_LIBSSH2_KNOWNHOST_API

  case CURLOPT_SSH_KNOWNHOSTS:
  case CURLOPT_SSH_KNOWNHOSTS:
    /*
    /*
     * Store the file name to read known hosts from.
     * Store the file name to read known hosts from.
@@ -2258,7 +2258,6 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
     */
     */
    data->set.ssh_keyfunc_userp = va_arg(param, void *);
    data->set.ssh_keyfunc_userp = va_arg(param, void *);
    break;
    break;
#endif /* HAVE_LIBSSH2_KNOWNHOST_API */
#endif /* USE_LIBSSH2 */
#endif /* USE_LIBSSH2 */


  case CURLOPT_HTTP_TRANSFER_DECODING:
  case CURLOPT_HTTP_TRANSFER_DECODING: