cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_SSH_KEYFUNCTION never gets called?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 Feb 2011 00:33:40 +0100 (CET)

On Sun, 20 Feb 2011, mlist0987_at_gmail.com wrote:

> I am trying to get SFTP support working using libcurl. I am setting a
> keyFunction like this:
>
> curlcode = curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, _keyFunction);
>
> but my key function never gets called when I try to connect to an SFTP
> server. I'm kind of surprised by this. Is this common? Under what
> circumstances should it get called? The docs seem to say that it should
> always be called.

It always gets called if set! It only ever not gets called if your libcurl was
built with an old libssh2 present that doesn't have the required knownhost
API...

(see lib/ssh.c line 661)

So, if you really don't get it called I think you should set a break-point in
the libcurl code and figure out how you manage to avoid it, and then tell us!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-21