1761 Commits

Author SHA1 Message Date
David Byron
6c84a426be add libssh2_scp_recv2 to support large (> 2GB) files on windows 2015-09-21 18:01:23 +01:00
sune
4961014033 WinCNG: support for SHA256/512 HMAC
Closes #47
2015-09-17 15:27:30 +02:00
brian m. carlson
a53cebba34 Add support for HMAC-SHA-256 and HMAC-SHA-512.
Implement support for these algorithms and wire them up to the libgcrypt
and OpenSSL backends.  Increase the maximum MAC buffer size to 64 bytes
to prevent buffer overflows.  Prefer HMAC-SHA-256 over HMAC-SHA-512, and
that over HMAC-SHA-1, as OpenSSH does.

Closes #40
2015-09-16 09:32:19 +02:00
Zenju
3768f8aeef kex: free server host key before allocating it (again)
Fixes a memory leak when Synology server requests key exchange

Closes #43
2015-09-12 12:30:13 +02:00
Viktor Szakats
3acca4ad15 GNUmakefile: up OpenSSL version
closes #23
2015-09-04 08:17:57 +02:00
Viktor Szakats
026ec0e881 GNUmakefile: add -m64 CFLAGS when targeting mingw64, add -m32/-m64 to LDFLAGS
libssh2 equivalent of curl patch d21b66835f

This allows to build for the non-default target when using a multi-target mingw distro.
Also bump default OpenSSL dependency path to 1.0.2c.
2015-09-04 08:17:51 +02:00
Viktor Szakats
a4d995af0d GNUmakefile: add support for LIBSSH2_LDFLAG_EXTRAS
It is similar to existing LIBSSH2_CFLAG_EXTRAS, but for
extra linker options.

Also delete some line/file ending whitespace.

closes #27
2015-08-07 00:38:40 +02:00
nasacj
9af7eb48dc hostkey.c: Fix compiling error when OPENSSL_NO_MD5 is defined
Closes #32
2015-08-07 00:36:23 +02:00
Mizunashi Mana
f4b5947d6d openssl.h: adjust the rsa/dsa includes
... to work when built without DSA support.

Closes #36
2015-08-07 00:34:36 +02:00
Alexander Lamaison
36f6d23572 Let CMake build work as a subproject.
Patch contributed by JasonHaslam.
2015-07-26 10:50:41 +01:00
Alexander Lamaison
af14462d53 Fix builds with Visual Studio 2015.
VS2015 moved stdio functions to the header files as inline function.  That means check_function_exists can't detect them because it doesn't use header files - just does a link check.  Instead we need to use check_symbol_exists with the correct headers.
2015-07-25 22:19:46 +01:00
Kamil Dudka
d48d7c3a87 cmake: include CMake files in the release tarballs
Despite we announced the CMake support in libssh2-1.6.0 release notes,
the files required by the CMake build system were not included in the
release tarballs.  Hence, the only way to use CMake for build was the
upstream git repository.

This commit makes CMake actually supported in the release tarballs.
2015-07-02 13:09:49 +02:00
Kamil Dudka
13f8addd1b tests/mansyntax.sh: fix 'make distcheck' with recent autotools
Do not create symbolic links off the build directory.  Recent autotools
verify that out-of-source build works even if the source directory tree
is not writable.
2015-07-02 12:42:55 +02:00
Kamil Dudka
418be878ad openssl: fix memleak in _libssh2_dsa_sha1_verify() 2015-06-12 12:05:27 +02:00
Daniel Stenberg
e9536edede openssl: make libssh2_sha1 return error code
- use the internal prefix _libssh2_ for non-exported functions

- removed libssh2_md5() since it wasn't used

Reported-by: Kamil Dudka
2015-06-12 10:53:18 +02:00
LarsNordin-LNdata
d754fee2f2 SFTP: Increase speed and datasize in SFTP read
The function sftp_read never return more then 2000 bytes (as it should
when I asked Daniel). I increased the MAX_SFTP_READ_SIZE to 30000 but
didn't get the same speed as a sftp read in SecureSSH. I analyzed the
code and found that a return always was dona when a chunk has been read.
I changed it to a sliding buffer and worked on all available chunks. I
got an increase in speed and non of the test I have done has failed
(both local net and over Internet). Please review and test. I think
30000 is still not the optimal MAX_SFTP_READ_SIZE, my next goal is to
make an API to enable changing this value (The SecureSSH sftp_read has
more complete filled packages when comparing the network traffic)
2015-06-12 09:15:47 +02:00
Daniel Stenberg
6c14cc003a bump: start working on 1.6.1 2015-06-12 09:15:47 +02:00
Daniel Stenberg
cbd5f72339 RELEASE-NOTES: synced with 858930cae5c6a libssh2-1.6.0 2015-06-05 17:05:58 +02:00
Marc Hoersken
858930cae5 wincng.c: fixed indentation 2015-05-19 23:12:43 +02:00
sbredahl
08fa27b628 wincng.c: fixed memleak in (block) cipher destructor 2015-05-19 22:59:16 +02:00
Jakob Egger
4383a39d83 libssh2_channel_open: more detailed error message
The error message returned by libssh2_channel_open in case of a server side channel open failure is now more detailed and includes the four standard error conditions in RFC 4254.
2015-05-06 11:28:27 +01:00
Hannes Domani
09c5e59933 kex: fix libgcrypt memory leaks of bignum
Fixes #168.
2015-04-03 17:39:15 +01:00
Marc Hoersken
5a88a86fef configure.ac: check for SecureZeroMemory for clear memory feature 2015-04-03 16:44:53 +02:00
Marc Hoersken
0340d4586e Revert "wincng.c: fix clear memory feature compilation with mingw"
This reverts commit 2d2744efdd0497b72b3e1ff6e732aa4c0037fc43.

Autobuilds show that this did not solve the issue.
And it seems like RtlFillMemory is defined to memset,
which would be optimized out by some compilers.
2015-04-03 15:02:39 +02:00
Marc Hoersken
2d2744efdd wincng.c: fix clear memory feature compilation with mingw 2015-04-03 14:48:34 +02:00
LarsNordin-LNdata
e113202098 Enable use of OpenSSL that doesn't have DSA.
Added #if LIBSSH2_DSA for all DSA functions.
2015-04-01 23:04:16 +01:00
LarsNordin-LNdata
983ceafe58 Use correct no-blowfish #define with OpenSSL.
The OpenSSL define is OPENSSL_NO_BF, not OPENSSL_NO_BLOWFISH.
2015-04-01 23:03:28 +01:00
Marc Hoersken
e160ba448e configure: error if explicitly enabled clear-memory is not supported
This takes 22bd8d81d8fab956085e2079bf8c29872455ce59 and
b8289b625e291bbb785ed4add31f4759241067f3 into account,
but still makes it enabled by default if it is supported
and error out in case it is unsupported and was requested.
2015-03-25 22:42:27 +01:00
Daniel Stenberg
b8289b625e configure: make clear-memory default but only WARN if backend unsupported
... instead of previous ERROR.
2015-03-25 09:57:44 +01:00
Marc Hoersken
5f4c249e42 wincng.h: fix warning about computed return value not being used 2015-03-24 21:46:10 +01:00
Marc Hoersken
6f95c2efd3 nonblocking examples: fix warning about unused tvdiff on Mac OS X 2015-03-24 21:42:10 +01:00
Daniel Stenberg
31a5986c6d openssl: fix compiler warnings 2015-03-24 08:40:43 +01:00
Daniel Stenberg
22bd8d81d8 cofigure: fix --disable-clear-memory check 2015-03-24 08:39:04 +01:00
Marc Hoersken
3d3347c062 scp.c: improved command length calculation
Reduced number of calls to strlen, because shell_quotearg already
returns the length of the resulting string (e.q. quoted path)
which we can add to the existing and known cmd_len.
Removed obsolete call to memset again, because we can put a final
NULL-byte at the end of the string using the calculated length.
2015-03-23 23:17:31 +01:00
Marc Hoersken
2d59b41daa scp.c: improved and streamlined formatting 2015-03-23 23:05:41 +01:00
Marc Hoersken
1e7988cb0d scp.c: fix that scp_recv may transmit not initialised memory 2015-03-23 23:04:24 +01:00
Marc Hoersken
b99204f289 scp.c: fix that scp_send may transmit not initialised memory
Fixes ticket 244. Thanks Torsten.
2015-03-23 22:47:46 +01:00
Marc Hoersken
7ca44fbd94 kex: do not ignore failure of libssh2_sha1_init()
Based upon 43b730ce56f010e9d33573fcb020df49798c1ed8.
Fixes ticket 290. Thanks for the suggestion, mstrsn.
2015-03-23 22:25:50 +01:00
Marc Hoersken
41b1cb6751 wincng.h: fix return code of libssh2_md5_init() 2015-03-23 22:23:41 +01:00
Marc Hoersken
84590bc78f openssl.c: fix possible segfault in case EVP_DigestInit fails 2015-03-23 22:07:39 +01:00
Marc Hoersken
864950cf16 wincng.c: fix possible use of uninitialized variables 2015-03-23 21:36:10 +01:00
Marc Hoersken
09a559433e wincng.c: fix unused argument warning if clear memory is not enabled 2015-03-23 21:33:24 +01:00
Marc Hoersken
57dea4df6d wincng: Added explicit clear memory feature to WinCNG backend
This re-introduces the original feature proposed during
the development of the WinCNG crypto backend. It still needs
to be added to libssh2 itself and probably other backends.

Memory is cleared using the function SecureZeroMemory which is
available on Windows systems, just like the WinCNG backend.
2015-03-22 16:52:35 +01:00
Marc Hoersken
77020c7961 wincng.c: fixed mixed line-endings 2015-03-22 16:52:31 +01:00
Marc Hoersken
e52f35d9f4 wincng.c: fixed use of invalid parameter types in a8d14c5dcf 2015-03-22 16:32:50 +01:00
Marc Hoersken
a8d14c5dcf wincng.c: only try to load keys corresponding to the algorithm 2015-03-22 16:29:53 +01:00
Marc Hoersken
0c90b8bd9b wincng.c: moved PEM headers into definitions 2015-03-22 16:22:15 +01:00
Marc Hoersken
3fc17cd69f wincng.h: fixed invalid parameter name 2015-03-22 15:58:22 +01:00
Marc Hoersken
aa4e649d94 wincng: fixed mismatch with declarations in crypto.h 2015-03-22 15:58:00 +01:00
Marc Hoersken
49ea2be885 userauth.c: fixed warning C6001: using uninitialized sig and sig_len 2015-03-22 15:56:48 +01:00