cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Why curleasy do nothing for SFTP

From: Mathew Simon <msimon_at_simdol.com>
Date: Mon, 20 Aug 2007 21:23:25 -0500

Thank you Guen! Your test reassures me that I am still (somewhat) sane!

On Mingw32, do you statically link or use the DLLs. It appears to me
that the Mingw32 builds are good for the dynamic linking usinbg DLLs,
but not suitable for static linking. I am struggling to create a static
build of my application with the libcurl static library and I am going
crazy. The static build will allow me to use the debugger I am familiar
with (Codeblocks + gdb) to test the SFTP issue. But I keep getting
undefined references. With Daniel's tip I was able to remove all
"_imp_*" undefined references. Still a lot more like the following keep
coming. I have no clue about what to include. Any suggestions?

C:\CodeBlocks\curl-7.17.0\lib\hostthre.c:296: undefined reference to
`WSASetLastError_at_4'
C:\CodeBlocks\curl-7.17.0\lib\hostthre.c:624: undefined reference to
`WSASetLastError_at_4'
C:\CodeBlocks\curl-7.17.0\lib\connect.c:622: undefined reference to
`getprotobyname_at_4'
C:\CodeBlocks\curl-7.17.0\lib\select.c:121: undefined reference to
`WSASetLastError_at_4'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:328: undefined reference to
`DES_set_odd_parity'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:329: undefined reference to
`DES_set_key'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:344: undefined reference to
`DES_ecb_encrypt'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:348: undefined reference to
`DES_ecb_encrypt'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:352: undefined reference to
`DES_ecb_encrypt'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:448: undefined reference to
`MD4_Init'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:449: undefined reference to
`MD4_Update'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:450: undefined reference to
`MD4_Final'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:839: undefined reference to
`gethostname_at_8'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:865: undefined reference to
`RAND_bytes'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:876: undefined reference to
`MD5_Init'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:877: undefined reference to
`MD5_Update'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:878: undefined reference to
`MD5_Final'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:397: undefined reference to
`DES_ecb_encrypt'
C:\CodeBlocks\curl-7.17.0\lib\http_ntlm.c:401: undefined reference to
`DES_ecb_encrypt'
C:\CodeBlocks\curl-7.17.0\lib\inet_ntop.c:75: undefined reference to
`inet_ntoa_at_4'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:158: undefined reference to
`RAND_status'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:185: undefined reference to
`RAND_load_file'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:219: undefined reference to
`RAND_screen'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:247: undefined reference to
`RAND_file_name'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:250: undefined reference to
`RAND_load_file'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:527: undefined reference to
`X509_STORE_CTX_get_current_cert'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:528: undefined reference to
`X509_get_subject_name'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:528: undefined reference to
`X509_NAME_oneline'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:540: undefined reference to
`ERR_error_string_n'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:560: undefined reference to
`ENGINE_load_builtin_engines'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:581: undefined reference to
`ERR_free_strings'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:628: undefined reference to
`ENGINE_by_id'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:640: undefined reference to
`ENGINE_init'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:636: undefined reference to
`ENGINE_finish'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:637: undefined reference to
`ENGINE_free'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:643: undefined reference to
`ENGINE_free'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:644: undefined reference to
`ERR_get_error'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:664: undefined reference to
`ENGINE_set_default'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:665: undefined reference to
`ENGINE_get_id'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:668: undefined reference to
`ENGINE_get_id'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:688: undefined reference to
`ENGINE_get_first'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:689: undefined reference to
`ENGINE_get_id'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:688: undefined reference to
`ENGINE_get_next'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:779: undefined reference to
`ERR_get_error'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:780: undefined reference to
`ERR_error_string'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:845: undefined reference to
`ERR_remove_state'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:849: undefined reference to
`ENGINE_finish'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:850: undefined reference to
`ENGINE_free'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:1526: undefined reference to
`ERR_get_error'
C:\CodeBlocks\curl-7.17.0\lib\ssluse.c:1640: undefined reference to
`X509_get_subject_name'

Thanks,
Mathew Simon

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Guenter Knauf
Sent: Monday, August 20, 2007 8:34 PM
To: curl-library_at_cool.haxx.se
Subject: RE: Why curleasy do nothing for SFTP

Hi,
> On Mon, 20 Aug 2007, Mathew Simon wrote:

>>> I'll try to do some real-world libcurl tests with sftp soon.
>>
>> The sshd server I am using to test with is Openssh 4.2, and it is on
>> Linux (Fedora Core-4).

> I just tried against openssh 4.6p1 on debian, both against localhost
> and against a remote server (10 hops, ~33 ms ping) and both seemed to
> work on multiple tests...

> I used curl and libssh2 current CVS on a Debian Linux (unstable).

well, I did just a MingW32 build with libssh2 0.17, and it didnt work
with my NetWare server:

curl 7.17.0-CVS (i386-pc-win32) libcurl/7.17.0-CVS OpenSSL/0.9.8e
zlib/1.2.3 libssh2/0.17
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: Largefile NTLM SSL libz
* About to connect() to 192.168.0.111 port 22 (#0)
* Trying 192.168.0.111... connected
* Connected to 192.168.0.111 (192.168.0.111) port 22 (#0)
* Closing connection #0
* Error in the SSH layer
curl: (79) Error in the SSH layer

while this one works against same box
(see also different output although I dont use certs but user/pass):
curl 7.16.4 (i386-pc-win32) libcurl/7.16.4 OpenSSL/0.9.8e zlib/1.2.3
libssh2/0.15-CVS
Protocols: tftp ftp telnet dict ldap http file https ftps scp sftp
Features: Largefile NTLM SSL SSPI libz
* Trying 192.168.0.111... connected
* Connected to 192.168.0.111 (192.168.0.111) port 22 (#0)
* SSH authentication methods available:
publickey,password,keyboard-interactive
* Using ssh public key file
* Using ssh private key file
* Initialized password authentication
* Authentication complete
drwxrwxrwx 1 16777216 0 0 Aug 20 8:47 .
drwxrwxrwx 1 16777216 0 0 Aug 20 8:47 NW65SRV2
* Closing connection #0

> This of course makes debugging of this problem a bit more tricky! :-(
I still think that this commit might be related;
it was only a suggestion what we might need here to get it compiled
again, and this code wasnt carefully enough checked (since I'm not the
Win32 Guru):
http://libssh2.cvs.sourceforge.net/libssh2/libssh2/src/session.c?r1=1.46
&r2=1.47

Guen.
Received on 2007-08-21