cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ssh2 issues on a mac

From: Michael Wood <esiotrot_at_gmail.com>
Date: Thu, 4 Dec 2008 08:33:36 +0200

On Thu, Dec 4, 2008 at 5:01 AM, Neil Wilson <neilw_at_cinesync.com> wrote:
> Hi,
>
> I am working on a project that uses libcurl 7.19.2 to handle FTP, SFTP, and
> FTPS transfers. This is a cross platform project for Windows, Mac (both
> intel and PPC), and Linux, and we are running the same code on all
> platforms. Everything seems to working fine apart from SFTP transfers on
> intel macs. When we run our software on intel macs curl_easy_perform returns
> CURL_FAILED_INIT. Using the debugger I've traced the problem down to
> libssh2_session_startup, which is returning LIBSSH2_ERROR_KEX_FAILURE. Why
> it is doing this I don't know.
>
> Our high level sftp curl code looks like so, and this seems to be working
> fine on all platforms apart from intel macs.
>
> CURL* curl = curl_easy_init();
> curl_easy_setopt(curl, CURLOPT_URL, urlString.c_str());
> curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
> if (verifyHostCertificate)
> curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L);
> else
> curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
> r = curl_easy_perform(curl);
>
>
> I think I must be missing something, because when I use the command line
> tool I can connect to out test sftp server ok - but what I am missing?

If you run curl with the "--libcurl test.c" option and then compile
and run that, does it work?

-- 
Michael Wood <esiotrot_at_gmail.com>
Received on 2008-12-04