Commit Graph

1679 Commits

Author SHA1 Message Date
Daniel Stenberg
ee07785a1e OpenSSL EVP: fix threaded use of structs
Make sure we don't clear or reset static structs after first init so
that they work fine even when used from multiple threads. Init the
structs in the global init.

Help and assistance by: John Engstrom

Fixes #229 (again)
2011-09-29 22:42:16 +02:00
Daniel Stenberg
24afd0fc72 openssl: don't init static structs differently
make_ctr_evp() is changed to take a struct pointer, and then each
_libssh2_EVP_aes_[keylen]_ctr function is made to pass in their own
static struct

Reported by: John Engstrom
Fixes #229
2011-09-28 22:26:47 +02:00
Guenter Knauf
abd00727ef Removed obsolete include path. 2011-09-27 16:04:11 +02:00
Daniel Stenberg
4b77724b3b read_state: clear the state variable better
Set read_state back to idle before trying to send anything so that if
the state somehow is wrongly set.

Also, avoid such a case of confusion by resetting the read_state when an
sftp handle is closed.
2011-09-21 16:16:27 +02:00
Daniel Stenberg
33865b8936 sftp_read: remove leftover fprintf
Reported by: Alexander Lamaison
2011-09-17 00:20:14 +02:00
Daniel Stenberg
16dd675f4d sftp.h: fix the #ifdef to prevent multiple inclusions 2011-09-16 22:08:55 +02:00
Daniel Stenberg
30e28817f2 sftp_read: use a state variable to avoid bad writes
When a channel_write call has gotten an EAGAIN back, we try harder to
continue the same write in the subsequent invoke.
2011-09-13 20:16:59 +02:00
Daniel Stenberg
03ca902075 window_size: explicit adjustments only
Removed the automatic window_size adjustments from
_libssh2_channel_read() and instead all channel readers must now make
sure to enlarge the window sizes properly themselves.

libssh2_channel_read_ex() - the public function, now grows the window
size according to the requested buffer size. Applications can still opt
to grow the window more on demand. Larger windows tend to give higher
performance.

sftp_read() now uses the read-ahead logic to figure out a window_size.
2011-09-13 11:21:23 +02:00
Daniel Stenberg
7d58994571 libssh2.h: bump the default window size to 256K 2011-09-13 11:21:23 +02:00
Daniel Stenberg
6d9d44a550 libssh2_userauth_keyboard_interactive.3: fix man warning
It seemed to occur due to the excessive line length
2011-09-12 15:41:28 +02:00
Mikhail Gusarov
d343e3405a Add missing .gitignore entries 2011-09-12 15:38:03 +02:00
Mikhail Gusarov
8d3709f57a Add manpage syntax checker to 'check' target
In virtually every libssh2 release Debian's lintian catches syntax errors in
manpages. Prevent it by checking manpages as a part of testsuite.
2011-09-12 15:38:00 +02:00
Daniel Stenberg
d2dc600be7 libssh2_banner_set.3: fix nroff syntax mistake 2011-09-11 19:25:03 +02:00
Guenter Knauf
0f9e81c6f3 Use predefined resource compiler macro. 2011-09-10 16:53:47 +02:00
Guenter Knauf
46792a9fca Added casts to silent compiler warnings. 2011-09-10 16:38:51 +02:00
Guenter Knauf
b5cd8fe120 Fixed uint64_t printf. 2011-09-10 16:29:29 +02:00
Guenter Knauf
8faefc0a8a Fixed macro function signatures. 2011-09-10 15:57:46 +02:00
Guenter Knauf
f9afe854d3 NetWare makefile tweaks. 2011-09-10 15:31:25 +02:00
Guenter Knauf
26a9aca598 Removed unused var. 2011-09-10 15:24:08 +02:00
Guenter Knauf
bff91fe2a0 Added 2 samples not mentioned. 2011-09-10 15:20:06 +02:00
Guenter Knauf
e0e8d3b0b7 Dont build x11 sample with MinGW. 2011-09-10 15:09:38 +02:00
Guenter Knauf
52d24bc9d2 Fixed executable file description. 2011-09-10 14:51:35 +02:00
Guenter Knauf
e399a852b9 Removed unused var. 2011-09-10 14:48:06 +02:00
Guenter Knauf
3fb3ba571b Kill stupid gcc 3.x uninitialized warning. 2011-09-10 14:22:08 +02:00
Guenter Knauf
1f2c1f9e09 Build all examples. 2011-09-10 14:21:05 +02:00
Guenter Knauf
c75ae587c0 More MinGW makefile tweaks.
Renamed *.mingw makefiles to GNUmakefile since GNU make picks these
up automatically, and therefore win32/Makefile removed.
2011-09-10 14:10:45 +02:00
Guenter Knauf
2e12cfaa23 Removed forgotten WINSOCK_VERSION defines. 2011-09-10 13:40:27 +02:00
Daniel Stenberg
7ed53e21fd libssh2_session_startup(3) => libssh2_session_handshake(3)
Propagate for the current function in docs and examples.
libssh2_session_startup() is deprecated.
2011-09-09 23:17:04 +02:00
Daniel Stenberg
7229d989e7 libssh2_banner_set => libssh2_session_banner_get
Marked the old function as deprecated. Added the new name in the correct
name space with the same arguments and functionality.
2011-09-09 23:11:42 +02:00
Daniel Stenberg
f2c21f6f84 new function: libssh2_session_banner_get
Returns the banner from the server handshake

Fixes #226
2011-09-09 23:00:05 +02:00
Daniel Stenberg
a6ebc6f9fd libssh2.h: bump version to 1.4.0 for new function(s) 2011-09-09 22:49:35 +02:00
Daniel Stenberg
87f79f177f remove embedded CVS/svn tags 2011-09-09 16:12:04 +02:00
liuzl
30ac056cb0 API add:libssh2_sftp_get_channel
Return the channel of sftp, then caller can
control the channel's behavior.

Signed-off-by: liuzl <xieepp@gmail.com>
2011-09-09 16:00:11 +02:00
Daniel Stenberg
c45de9176b _libssh2_channel_read: react on errors from receive_window_adjust
Previously the function would ignore all errors except for EAGAIN.
2011-09-09 10:30:43 +02:00
Daniel Stenberg
ff40c58743 sftp_read: extend and clarify the documentation 2011-09-08 23:02:58 +02:00
Daniel Stenberg
10b66cef08 sftp_read: cap the read ahead maximum amount
Now we only go up to LIBSSH2_CHANNEL_WINDOW_DEFAULT*30 bytes SFTP read
ahead, which currently equals 64K*30 == 1966080 bytes.
2011-09-08 22:47:38 +02:00
Daniel Stenberg
81bdcf61f3 _libssh2_channel_read: fix non-blocking window adjusting
If EAGAIN is returned when adjusting the receive window, we must not
read from the transport directly until we've finished the adjusting.
2011-09-08 14:25:25 +02:00
Guenter Knauf
50d451e307 Fix for systems which need sys/select.h. 2011-09-08 13:53:05 +02:00
Guenter Knauf
3f2b1dea5e The files were not gone but renamed ... 2011-09-08 11:59:49 +02:00
Daniel Stenberg
7c9b84d1d1 sftp_read: added documenting comment
Taken from some recent email conversations I added some descriptions of
the logic in sftp_read() to aid readers.
2011-09-06 23:31:07 +02:00
Daniel Stenberg
1ba42ea847 1.3.1: start the work 2011-09-06 23:27:50 +02:00
Daniel Stenberg
507d5f96cf Makefile.am: the Makefile.win32 files are gone 2011-09-06 22:56:06 +02:00
Daniel Stenberg
84d8728835 RELEASE-NOTES: updated for 1.3.0 2011-09-06 22:47:34 +02:00
Daniel Stenberg
296d57bb2c sftp_read: a short read is not end of file
A returned READ packet that is short will now only reduce the
offset.

This is a temporary fix as it is slightly better than the previous
approach but still not very good.
2011-09-06 22:43:26 +02:00
liuzl
9e79031ad7 _libssh2_packet_add: adjust window size when truncating
When receiving more data than what the window size allows on a
particular channel, make sure that the window size is adjusted in that
case too. Previously it would only adjust the window in the non-error
case.
2011-08-31 10:45:12 +02:00
Guenter Knauf
689fc5c596 Silent compiler warning with MinGW64. 2011-08-29 15:30:18 +02:00
Guenter Knauf
31a9e8860d Fixed link to native Win32 awk tool. 2011-08-29 14:05:15 +02:00
Guenter Knauf
b26c3e7cce Renamed MinGW makefiles. 2011-08-29 13:59:43 +02:00
Guenter Knauf
e4eeb85f01 Some MinGW makefile tweaks.
Enable build without GNU tools and with MinGW64 compiler.
2011-08-29 13:54:51 +02:00
Guenter Knauf
7de77e94bf Fixed aes_ctr_do_cipher() signature. 2011-08-29 13:27:46 +02:00