Aris Adamantiadis
7bd62dd652
buffers: adapt sftpserver.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:52:29 +02:00
Aris Adamantiadis
c341da03d3
buffers: adapt sftp.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:51:00 +02:00
Aris Adamantiadis
c238136010
buffers: adapt session.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:47:35 +02:00
Aris Adamantiadis
5a08ddcff2
buffers: adapt server.c to ssh_buffer_(un)pack()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:46:14 +02:00
Aris Adamantiadis
a182926024
buffers: adapt pcap.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:46:14 +02:00
Aris Adamantiadis
9457685320
buffers: adapt ecdh.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:46:14 +02:00
Aris Adamantiadis
e9fd14c7f0
buffers: adapt packet.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:46:14 +02:00
Aris Adamantiadis
cfd2e4894e
buffers: adapt messages.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:46:14 +02:00
Aris Adamantiadis
3703389feb
buffers: adapt gssapi.c to ssh_buffer_(un)pack()
2014-08-06 09:46:14 +02:00
Aris Adamantiadis
673990f568
buffers: adapt curve25519.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:33:32 +02:00
Aris Adamantiadis
97638a1465
buffers: adapt client.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:33:07 +02:00
Aris Adamantiadis
506e11fa8b
buffers: adapt channels.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:33:03 +02:00
Aris Adamantiadis
1dd95675df
buffer: adapt dh.c to new ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:20:49 +02:00
Aris Adamantiadis
cb10ad0c84
buffer: adapt kex.c to new ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:20:49 +02:00
Aris Adamantiadis
1f2c61d6ad
buffer: adapt auth.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-08-06 09:20:49 +02:00
Aris Adamantiadis
1d97f75b0a
tests: test for ssh_buffer_(un)pack
...
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-06 09:20:45 +02:00
Aris Adamantiadis
835e34d1eb
Buffer: add ssh_buffer_(un)pack()
...
That function permits chaining of buffer values to minimize buffer handling
in packet sending code.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-08-06 09:04:34 +02:00
Aris Adamantiadis
13c42bff3f
examples: cast arguments of connect(2)
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-07-06 20:36:49 +02:00
Andreas Schneider
59a1799501
log: Add check for return value.
...
For some reason I got a segfault in gdb here. Make sure it works
correctly.
2014-06-10 13:52:38 +02:00
Andreas Schneider
d9c47a8cfa
tests: Add test for the logging function.
2014-06-10 13:52:20 +02:00
Jon Simons
987991a3f2
session: fix ssh_session->srv.ecdsa_key leak
...
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-28 10:23:46 +02:00
Andreas Schneider
a738507ad2
cmake: Fix the build on Windows.
2014-05-27 15:42:53 +02:00
Andreas Schneider
142b2e4ede
cmake: Fix libssh cmake-config files.
2014-05-22 14:52:52 +02:00
Hani Benhabiles
517a01b7ad
Set the correct version in CMakeLists.txt
...
Signed-off-by: Hani Benhabiles <hani@linux.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-20 09:41:20 +02:00
Andreas Schneider
83633d539e
pki: Fix build without ECC support.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2014-05-09 08:55:49 +02:00
Andreas Schneider
c2ee63431b
pki: Add missing semi-colon.
2014-05-07 09:30:29 +02:00
Jon Simons
9e4bc10525
kex: NULL checks for 'first_kex_packet_follows'
...
Add NULL checks to 'is_first_kex_packet_follows_guess_wrong'
to ensure that a 'strdup(NULL)' path can not be taken.
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-06 09:04:07 +02:00
Alan Dunn
f37c844bf7
messages: Add missing ntohl on X11 request screen number
...
BUG: https://red.libssh.org/issues/160
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-06 08:56:44 +02:00
Hani Benhabiles
2c7dfb02a8
Small documentation fix.
...
Signed-off-by: Hani Benhabiles <hani@linux.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-06 08:52:55 +02:00
Andreas Schneider
2884bbf5b1
pki: Correctly update the ECDSA keytype.
2014-04-23 11:16:28 +02:00
Andreas Schneider
f48a99b97c
pki: Move ssh_pki_key_ecdsa_name() to the correct file.
2014-04-23 11:15:05 +02:00
Andreas Schneider
11cfb2903e
pki: Make pki_key_ecdsa_nid_to_name() a shared function.
2014-04-23 11:12:08 +02:00
Dirkjan Bussink
c520d97dd9
Add tests for SHA2 HMAC algorithms
...
BUG: https://red.libssh.org/issues/91
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 10:57:35 +02:00
Dirkjan Bussink
6c74d6f891
Add options support for setting and getting HMAC algorithms
...
BUG: https://red.libssh.org/issues/91
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 10:57:18 +02:00
Dirkjan Bussink
262c82ac06
Add negotiation for SHA2 HMAC algorithms
...
BUG: https://red.libssh.org/issues/91
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 10:57:00 +02:00
Dirkjan Bussink
164b8e99cc
Add logic to support SHA2 HMAC algorithms
...
BUG: https://red.libssh.org/issues/91
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 10:56:46 +02:00
Dirkjan Bussink
4a08902664
Add SHA2 algorithms for HMAC
...
BUG: https://red.libssh.org/issues/91
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 10:55:59 +02:00
Gangadhar Sandrani
d6e6a453fc
log: Fix log levels.
...
Signed-off-by: Gangadhar Sandrani <gangadhar.sandrani@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 09:35:33 +02:00
Jon Simons
eb86fd8cdf
kex: server fix for first_kex_packet_follows
...
Ensure to honor the 'first_kex_packet_follow' field when processing
KEXINIT messages in the 'ssh_packet_kexinit' callback. Until now
libssh would assume that this field is always unset (zero). But
some clients may set this (dropbear at or beyond version 2013.57),
and it needs to be included when computing the session ID.
Also include logic for handling wrongly-guessed key exchange algorithms.
Save whether a client's guess is wrong in a new field in the session
struct: when set, the next KEX_DHINIT message to be processed will be
ignored per RFC 4253, 7.1.
While here, update both 'ssh_packet_kexinit' and 'make_sessionid' to
use softabs with a 4 space indent level throughout, and also convert
various error-checking to store intermediate values into an explicit
'rc'.
Patch adjusted from original to ensure that client tests remain passing
(ie 'torture_connect'): restrict the changes in 'ssh_packet_kexinit'
only for the 'server_kex' case.
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 09:26:59 +02:00
Alan Dunn
099e2e8438
build: Do not link against libssl, only libcrypto
...
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-22 09:24:54 +02:00
Andreas Schneider
291312c5e4
cmake: Install cmake config files to the correct directory.
2014-04-16 15:45:33 +02:00
Andreas Schneider
e2805abbf7
Revert "kex: server fix for first_kex_packet_follows"
...
The patch breaks the client with ECDSA.
This reverts commit 5865b9436fda96ac9fc7c18e4dffe5fb12dcc515.
2014-04-15 09:49:25 +02:00
Andreas Schneider
79d51099ac
examples: Fix a bad shift if ssh_get_fd() returns -1.
...
Found by Coverity.
CID: #1199454
2014-04-14 21:24:28 +02:00
Andreas Schneider
adf23533e0
doc: Improve docs for ssh_channel_get_exit_status().
...
BUG: https://red.libssh.org/issues/154
2014-04-10 08:54:11 +02:00
Andreas Schneider
927cd90dc1
channels: Fix exit-signal request.
...
BUG: https://red.libssh.org/issues/153
2014-04-10 08:54:11 +02:00
Andreas Schneider
b5efbe75cd
session: Fix a memory leak with custom banner.
...
BUG: https://red.libssh.org/issues/152
2014-04-10 08:54:10 +02:00
Andreas Schneider
01311dd419
cmake: Fix doxygen.
2014-04-10 08:54:10 +02:00
Jon Simons
5865b9436f
kex: server fix for first_kex_packet_follows
...
Ensure to honor the 'first_kex_packet_follow' field when processing
KEXINIT messages in the 'ssh_packet_kexinit' callback. Until now
libssh would assume that this field is always unset (zero). But
some clients may set this (dropbear at or beyond version 2013.57),
and it needs to be included when computing the session ID.
Also include logic for handling wrongly-guessed key exchange algorithms.
Save whether a client's guess is wrong in a new field in the session
struct: when set, the next KEX_DHINIT message to be processed will be
ignored per RFC 4253, 7.1.
While here, update both 'ssh_packet_kexinit' and 'make_sessionid' to
use softabs with a 4 space indent level throughout, and also convert
various error-checking to store intermediate values into an explicit
'rc'.
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-10 08:54:10 +02:00
Andreas Schneider
ad1313c2e5
Revert "direct-tcpip and forwarded-tcpip callbacks"
...
This reverts commit efe785e711e1fe8c66dc120b741d1e560ef556db.
We need a Signed-off version. I didn't have the Certificate of Origin
yet.
2014-04-09 12:49:06 +02:00
Andreas Schneider
0cb9f792b8
cmake: Update doxygen module.
2014-04-09 11:21:29 +02:00