curl-library
Re: Getting files from SFTP is slower at newer versions
Date: Tue, 31 May 2016 20:36:45 +0300
On Tue, May 31, 2016 at 5:10 PM, Moti Avrahami <moti.dp_at_gmail.com> wrote:
> On Sun, May 29, 2016 at 9:09 PM, Ray Satiro via curl-library <
> curl-library_at_cool.haxx.se> wrote:
>
>> On 5/29/2016 4:05 AM, Moti Avrahami wrote:
>>
>>> The weird fact is that I tried it also with curl.exe and it works, but
>>> doesn't work with libcurl.
>>> I tried it against 2 servers and got the same result.
>>> I verified the libcurl commands by the "curl.exe --libcurl" option and
>>> it's seems Ok.
>>>
>>> I've also sent a question to the libssh2 development group and published
>>> the below debug output from libssh2, but still didn't get an answer there.
>>>
>>> Any idea?
>>>
>>
>> Please do not top post, it makes your threads harder to follow and
>> discourages people from reading them [1].
>>
>> As I already told you on the libssh2 mailing list I've tried 1.7.0 and it
>> works for me [2]. You should disclose the server type. You should check
>> that the version of libcurl being used by your application is actually the
>> same as what you think, and not some older DLL or something. printf("%s\n",
>> curl_version());
>>
>> Also another thing you could try is a contributor's libcurl/libssh2 build
>> [3].
>>
>>
>> [1]: https://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post
>> [2]:
>> https://www.libssh2.org/mail/libssh2-devel-archive-2016-05/0015.shtml
>> [3]: https://bintray.com/vszakats/generic/curl
>>
>>
>> -------------------------------------------------------------------
>> List admin: https://cool.haxx.se/list/listinfo/curl-library
>> Etiquette: https://curl.haxx.se/mail/etiquette.html
>>
>
>
> Thanks for your comments.
> I further investigated it and understood it's totally not related to the
> server type but more a build issue:
> I created a demo exe program which uses a demo static library project,
> that run libCurl commands for connecting SFTP server - this is work, the
> return code is "CURLE_OK".
> In contrast, my real application that uses my real lib project which run
> the same libCurl commands, doesn't work - the return code is
> "CURLE_FAILED_INIT".
> They both (real & demo) run the same libCurl commands and they both have
> the same project properties and same configuration.
> Of course, I pointed them to the same libs of libcurl and libssh2.
> I've also checked the version by printf("%s\n", curl_version()) and got
> the right versions: libcurl/7.49.0 mbedTLS/2.2.1 libssh2/1.7.0
>
> These are the libCurl commands I told you about:
> CURLcode ret;
> CURL *hnd;
>
> hnd = curl_easy_init();
> curl_easy_setopt(hnd, CURLOPT_URL, "sftp://x.x.x.x/root/file.log");
> curl_easy_setopt(hnd, CURLOPT_USERPWD, "myuser:mypass");
> curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.49.0");
> curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
> curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
> curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
> curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
>
> ret = curl_easy_perform(hnd);
>
> Any new ideas?
>
> Thanks,
> Moti
>
>
>
>
>
Hi,
I managed to identify the problem.
It's turned out that my openSSL lib (which used by libssh2) is of FIPS
version and that's why my libssh2 doesn't work properly as it use some
functions that are not allowed in FIPS standard.
Is there any "FIPS patch" for libssh2 or known best practices?
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-31