cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_SSH_KEYFUNCTION never gets called?

From: <mlist0987_at_gmail.com>
Date: Sun, 20 Feb 2011 19:16:21 -0800

Hmmm.

I'm using libssh2 and libcurl built by MacPorts, so I can't conveniently set a breakpoint inside either. The libssh2 version is 1.2.7 (which is the latest) and the libcurl is actually from Macports' curl package and is 7.21.2 (late enough, no?). MacPorts claims that curl is configured for SFTP, SCP, and SSL.

_murat

On Feb 20, 2011, at 3:33 PM, Daniel Stenberg wrote:

> 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

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