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 43b730ce56
.
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
Marc Hoersken
247dfce5fb
pem.c: fixed warning C6269: possible incorrect order of operations
2015-03-22 15:54:14 +01:00
Marc Hoersken
71d45d3df1
wincng: add support for authentication keys to be passed in memory
...
Based upon 18cfec8336
and daa2dfa2db
.
2015-03-22 15:41:51 +01:00
Marc Hoersken
daa2dfa2db
pem.c: add _libssh2_pem_parse_memory to parse PEM from memory
...
Requirement to implement 18cfec8336
for Libgcrypt and WinCNG.
2015-03-22 14:39:14 +01:00
Marc Hoersken
1429ad749d
pem.c: fix copy and paste mistake from 55d030089b
2015-03-22 13:58:09 +01:00
Marc Hoersken
4078da8d81
userauth.c: fix another possible dereference of a null pointer
2015-03-22 13:53:42 +01:00
Marc Hoersken
0930928810
userauth.c: fix possible dereference of a null pointer
2015-03-22 13:51:47 +01:00
Marc Hoersken
55d030089b
pem.c: reduce number of calls to strlen in readline
2015-03-22 13:38:22 +01:00
Will Cosgrove
260410edf3
Initialise HMAC_CTX in more places.
...
Missed a couple more places we init ctx to avoid openssl threading crash.
2015-03-17 00:06:51 +00:00
Alexander Lamaison
1de36eb5b4
Build build breakage in WinCNG backend caused when adding libssh2_userauth_publickey_frommemory.
...
The new feature isn't implemented for the WinCNG backend currently, but the WinCNG backend didn't contain any implementation of the required backend functions - even ones that returns an error. That caused link errors.
This change fixes the problem by providing an implementation of the backend functions that returns an error.
2015-03-16 23:39:30 +00:00
Alexander Lamaison
aa7f9a85f7
Fix breakage in WinCNG backend caused by introducing libssh2_hmac_ctx_init.
...
The macro was defined to nothing for the libgcrypt backend, but not for WinCNG. This brings the latter into line with the former.
2015-03-16 23:15:33 +00:00
Daniel Stenberg
41d22ccf26
userauth_publickey_frommemory.3: add AVAILABILITY
...
... it will be added in 1.6.0
2015-03-15 12:04:10 +01:00
Daniel Stenberg
56f7c0e2a4
libssh2: next version will be called 1.6.0
...
... since we just added a new function.
2015-03-15 12:03:40 +01:00
Daniel Stenberg
1329dc5155
docs: add libssh2_userauth_publickey_frommemory.3 to dist
...
The function and man page were added in commit 18cfec8336
2015-03-15 11:48:59 +01:00
Jakob Egger
a1e744bb5e
direct_tcpip: Fixed channel write
...
There were 3 bugs in this loop:
1) Started from beginning after partial writes
2) Aborted when 0 bytes were sent
3) Ignored LIBSSH2_ERROR_EAGAIN
See also:
https://trac.libssh2.org/ticket/281
https://trac.libssh2.org/ticket/293
2015-03-15 11:20:17 +01:00
Will Cosgrove
14d9ee01bc
Must init HMAC_CTX before using it.
...
Must init ctx before using it or openssl will reuse the hmac which is not thread safe and causes a crash.
Added libssh2_hmac_ctx_init macro.
2015-03-15 00:16:46 +00:00
Alexander Lamaison
fed47c34e4
Add continuous integration configurations.
...
Linux-based CI is done by Travis CI. Windows-based CI is done by Appveyor.
2015-03-15 00:06:15 +00:00
David Calavera
18cfec8336
Allow authentication keys to be passed in memory.
...
All credits go to Joe Turpin, I'm just reaplying and cleaning his patch:
http://www.libssh2.org/mail/libssh2-devel-archive-2012-01/0015.shtml
* Use an unimplemented error for extracting keys from memory with libgcrypt.
2015-03-14 23:54:49 +00:00
Daniel Stenberg
74624c8ddf
docs: include the renamed INSTALL* files in dist
2015-03-14 17:38:21 +01:00
Alexander Lamaison
bbbdf946a7
Prevent collisions between CMake and Autotools in examples/ and tests/.
2015-03-13 07:47:41 +00:00
Alexander Lamaison
042993b8eb
Avoid clash between CMake build and Autotools.
...
Autotools expects a configuration template file at src/libssh2_config.h.in, which buildconf generates. But the CMake build system has its CMake-specific version of the file at this path. This means that, if you don't run buildconf, the Autotools build will fail because it configured the wrong header template.
See https://github.com/libssh2/libssh2/pull/8 .
2015-03-13 00:21:04 +00:00
Alexander Lamaison
41ed2b71a2
Merge pull request #8 from alamaison/cmake
...
CMake build system.
2015-03-12 23:13:39 +00:00
Alexander Lamaison
6bf8983368
CMake build system.
...
Tested:
- Windows:
- Visual C++ 2005/2008/2010/2012/2013/MinGW-w64
- static/shared
- 32/64-bit
- OpenSSL/WinCNG
- Without zlib
- Linux:
- GCC 4.6.3/Clang 3.4
- static/shared
- 32/64-bit
- OpenSSL/Libgcrypt
- With/Without zlib
- MacOS X
- AppleClang 6.0.0
- static
- 64-bit
- OpenSSL
- Without zlib
Conflicts:
README
2015-03-12 22:48:38 +00:00
Alexander Lamaison
523a552258
Man man syntax tests fail gracefully if man version is not suitable.
2015-03-12 22:11:47 +00:00
Alexander Lamaison
d73e0ec260
Return valid code from test fixture on failure.
...
The sshd test fixture was returning -1 if an error occurred, but negative error codes aren't technically valid (google it). Bash on Windows converted them to 0 which made setup failure look as though all tests were passing.
2015-03-12 21:50:11 +00:00
Alexander Lamaison
1fa5fe6059
Let mansyntax.sh work regardless of where it is called from.
2015-03-12 21:48:59 +00:00
Viktor Szakáts
8f00a7471d
mingw build: allow to pass custom CFLAGS
...
Allow to pass custom `CFLAGS` options via environment variable
`LIBSSH2_CFLAG_EXTRAS`. Default and automatically added options of
`GNUmakefile` have preference over custom ones. This addition is useful
for passing f.e. custom CPU tuning or LTO optimization (`-flto
-ffat-lto-objects`) options. The only current way to do this is to edit
`GNUmakefile`. This patch makes it unnecessary.
This is a mirror of similar libcurl patch:
https://github.com/bagder/curl/pull/136
2015-03-12 11:23:23 +01:00
Will Cosgrove
fe3e23022b
userauth: Fixed prompt text no longer being copied to the prompts struct
...
Regression from 031566f9c
2015-03-11 23:11:28 +01:00
Daniel Stenberg
33e1013d7b
README: update the git repo locations
2015-03-11 22:40:37 +01:00
Daniel Stenberg
20eb836f4e
wait_socket: wrong use of difftime()
...
With reversed arguments it would always return a negative value...
Bug: https://github.com/bagder/libssh2/issues/1
2015-03-11 12:16:18 +01:00
Daniel Stenberg
6ada234c62
bump: start working toward 1.5.1 now
2015-03-11 08:21:09 +01:00
Daniel Stenberg
e16f638dca
RELEASE-NOTES: 1.5.0 release
2015-03-11 08:07:45 +01:00
Mariusz Ziulek
7d94b69b80
kex: bail out on rubbish in the incoming packet
...
CVE-2015-1782
Bug: http://www.libssh2.org/adv_20150311.html
2015-03-07 11:57:04 +01:00
Daniel Stenberg
8bb6cf7f95
docs: move INSTALL, AUTHORS, HACKING and TODO to docs/
...
And with this, cleanup README to be shorter and mention the new source
code home.
2015-03-07 11:42:14 +01:00
Daniel Stenberg
5fcbb168b8
.gitignore: don't ignore INSTALL
2015-03-07 11:32:08 +01:00
Dan Fandrich
d811750645
examples/x11.c: include sys/select.h for improved portability
2015-03-04 22:57:25 +01:00