Commit Graph

1548 Commits

Author SHA1 Message Date
Peter Stuge
0ebe6f44bd example/subsystem_netconf.c: Add a missing newline in an error message 2012-02-01 11:35:00 +01:00
Peter Stuge
b3ade9a63e Fix undefined reference to _libssh_error in libgcrypt backend
Commit 209de22299 introduced a function
call to a non-existing function, and since then the libgcrypt backend
has not been buildable.
2012-02-01 09:53:44 +01:00
Daniel Stenberg
388920cf3c RELEASE-NOTES: synced with 6bd584d29 for 1.4.0 2012-01-31 23:23:04 +01:00
Daniel Stenberg
6bd584d293 s/1.3.1/1.4.0
We're bumping the minor number
2012-01-31 23:22:30 +01:00
Jernej Kovacic
e68c895fc4 libssh2_session_supported_algs: fix compiler warning 2012-01-31 23:07:21 +01:00
Jernej Kovacic
511a972a95 session_supported_algs docs: added an example 2012-01-31 23:05:03 +01:00
Gellule Xg
3401b374c9 sftp-seek: clear EOF flag
Set the EOF flag to False when calling seek64 to be able to get some
data back on a following read
2012-01-27 11:03:31 +01:00
Peter Krempa
209de22299 userauth: Provide more informations if ssh pub key extraction fails
If the function that extracts/computes the public key from a private key
fails the errors it reports were masked by the function calling it. This
patch modifies the key extraction function to return errors using
_libssh_error() function.  The error messages are tweaked to contain
reference to the failed operaton in addition to the reason.

 * AUTHORS: - add my name
 * libgcrypt.c: _libssh2_pub_priv_keyfile(): - return a more verbose
                                               error using
                                               _libssh2_error() func.
 * openssl.c: - modify call graph of _libssh2_pub_priv_keyfile() to use
                _libssh2_error for error reporting();
 * userauth.c: - tweak functions calling _libssh2_pub_priv_keyfile() not
                 to shadow error messages
2011-12-19 23:18:46 +01:00
Daniel Stenberg
b8dd697796 TODO: remove issues we (sort of) did already 2011-12-09 14:21:36 +01:00
Daniel Stenberg
09139ef065 ssh2_exec: skip error outputs for EAGAIN
Since the example uses non-blocking mode, it will just flood the output
with this "nonsense" error.
2011-12-08 10:54:46 +01:00
Guenter Knauf
d903b81c64 Some NetWare makefile tweaks. 2011-11-30 17:52:06 +01:00
Daniel Stenberg
4f61824908 LIBSSH2_SFTP_PACKET_MAXLEN: increase to 80000
Some SFTP servers send SFTP packets larger than 40000. Since the limit
is only present to avoid insane sizes anyway, we can easily bump it.

The define was formerly in the public header libssh2_sftp.h but served
no external purpose and was moved into the source dir.

Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2011-11/0004.shtml
Reported by: Michael Harris
2011-11-18 23:36:52 +01:00
Peter Krempa
fed94fa85d knownhost_check(): Don't dereference ext if NULL is passed
Documentation for libssh2_knownhost_checkp() and related functions
states that the last argument is filled with data if non-NULL.

"knownhost if set to non-NULL, it must be a pointer to a 'struct
libssh2_knownhost' pointer that gets filled in to point to info about a
known host that matches or partially matches."

In this function ext is dereferenced even if set to NULL, causing
segfault in applications not needing the extra data.
2011-11-18 16:11:19 +00:00
Peter Krempa
378311fe5b knownhost_add: Avoid dereferencing uninitialized memory on error path.
In function knownhost_add, memory is alocated for a new entry. If normal
alocation is used, memory is not initialized to 0 right after, but a
check is done to verify if correct key type is passed. This test is done
BEFORE setting the memory to null, and on the error path function
free_host() is called, that tries to dereference unititialized memory,
resulting into a glibc abort().

 * knownhost.c - knownhost_add(): - move typemask check before alloc
2011-11-11 21:52:46 +01:00
Daniel Stenberg
139278b79f windows build: add define to avoid compiler warning
A recent mingw compiler has started to complain on "#warning Please
include winsock2.h before windows.h" unless the magic define is set
first.

Reported by: Vincent Torri
Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2011-10/0064.shtml
2011-11-01 22:45:49 +01:00
Vincent Torri
a0e13cc828 Correct Windows include file name case, simplifying cross-compilation
When cross compiling to Windows, libssh2.h include Windows header files
with upper case filenames : BaseTsd.h and WinSock2.h.

These files have lowercase names with mingw-w64 (iirc, it's the same with
mingw). And as on Windows, being lowercase or uppercase does not matter.
2011-10-31 11:32:52 +01:00
Jernej Kovacic
f4e5ca2f14 libssh2_session_supported_algs: added 2011-10-25 23:50:44 +02:00
Kamil Dudka
c0974e5ca3 example/sftp_RW_nonblock: do not ignore LIBSSH2_ERROR_EAGAIN
Bug: https://bugzilla.redhat.com/745420
2011-10-24 22:22:57 +02:00
Peter Stuge
c292378327 example/ssh2_agent: Print host key fingerprint before authentication
Also moves the comment about not being authenticated to before the
agent authentication takes place, so that it better matches the code.
2011-10-05 16:55:58 +02:00
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