cURL / Mailing Lists / curl-library / Single Mail

curl-library

ssh2 issues on a mac

From: Neil Wilson <neilw_at_cinesync.com>
Date: Thu, 04 Dec 2008 14:17:15 +1030

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?

Any help would be appreciated

regards

Neil Wilson
Received on 2008-12-04