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
Luka Perkov
9c2127b798
server: silence build warning
...
The commit fixes this build warning:
====
src/server.c:223:8: warning: ‘privkey’ may be used uninitialized in this function [-Wmaybe-uninitialized]
rc = ssh_pki_export_privkey_to_pubkey(*privkey, &pubkey);
^
src/server.c:243:11: note: ‘privkey’ was declared here
ssh_key privkey;
====
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-03-12 14:12:18 +01:00
Andreas Schneider
9c4144689d
src: Rename buffer_init to ssh_buffer_init().
2014-01-19 20:43:29 +01:00
Aris Adamantiadis
aecd952d18
update copyright information
2014-01-07 15:18:15 +01:00
Nicolas Viennot
7b63fe2f22
server: Add a ssh_send_keepalive() function.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-11-24 23:21:04 +01:00
Andreas Schneider
e8e99ec6de
server: Fix malloc call.
2013-11-09 12:47:02 +01:00
Aris Adamantiadis
4cb6afcbd4
kex: implement curve25519-sha256@libssh.org
2013-09-27 15:32:44 +02:00
Andreas Schneider
c64ec43eef
src: Remove enter_function() and leave_function().
2013-07-14 13:31:24 +02:00
Andreas Schneider
ebdd0c6ac1
src: Migrate to SSH_LOG.
2013-07-14 12:44:26 +02:00
Aris Adamantiadis
dd6a0b51ac
Server: fix rekeying
2013-07-13 22:56:07 +02:00
Aris Adamantiadis
37cce98f7e
Doc: fix a few broken parameters
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:56:14 +02:00
Aris Adamantiadis
1246ad812c
server: move message-specific call to ssh_*
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:21:36 +02:00
Andreas Schneider
e3c5096fcf
server: Fix a double free.
2013-06-13 10:48:50 +02:00
Andrew Collins
5cd7942801
Fix an invalid strlen comparison in ssh_message_auth_reply_default
...
During the transition to strncat in ssh_message_auth_reply_default,
an invalid strlen comparison was added which causes the function
to fail whenever it's called.
Signed-off-by: Andrew Collins <bsderandrew@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2012-12-19 16:03:49 +01:00
Andreas Schneider
95ab34696b
kex: Use getter functions to access kex arrays.
...
This should fix the build on OpenIndiana.
2012-10-12 17:46:37 +02:00
Andreas Schneider
b1287cd946
server: Use strncat instead of strcat.
...
This is just hardening the code.
Found by Coverity.
2012-10-12 14:45:54 +02:00
Andreas Schneider
4e7736444f
server: Don't leak memory on calling ssh_string_from_char().
...
Also check the return values.
Found by Coverity.
2012-10-12 08:07:01 +02:00
Andreas Schneider
6352b3d93a
server: Fix for loop to free server methods.
...
Found by Coverity.
2012-10-12 08:06:55 +02:00
Andreas Schneider
956cf94f70
server: Removed unused variable keytype in the ecdsa case.
2012-10-07 21:31:49 +02:00
Dmitriy Kuznetsov
e689375e45
dh: Add support for diffie-hellman-group14-sha1.
2012-09-04 16:17:46 +02:00
Andreas Schneider
1973e833f2
server: Add ecdsa hostkey support.
2012-02-19 18:49:07 +01:00
Andreas Schneider
ee774479de
session: Use a struct for all options.
2012-02-05 11:50:49 +01:00
Andreas Schneider
ce0324770d
kex: Fix some build warnings.
2011-11-10 14:46:22 +01:00
Aris Adamantiadis
5c19cda280
Fix warning
2011-09-24 14:08:52 +02:00
Aris Adamantiadis
046aa02f39
Fix bugs found by clang
2011-09-23 22:27:46 +02:00
Andreas Schneider
d7fa15df83
priv: Move kex functions to kex header.
2011-09-18 21:37:17 +02:00
Andreas Schneider
519291558d
priv: Move options and config prototypes to own header.
2011-09-18 21:37:17 +02:00
Aris Adamantiadis
09b33b1b6e
server: split dh_handsake_server
2011-09-18 20:34:16 +02:00
Aris Adamantiadis
ac41a083ef
kex: moved KEX structures to ssh_crypto_struct
2011-09-18 20:34:16 +02:00
Aris Adamantiadis
22668bcdae
kex: have server_kex use the elected methods
2011-09-18 20:34:15 +02:00
Aris Adamantiadis
07abc3406d
kex: split key selection and sending
2011-09-18 20:34:15 +02:00
Andreas Schneider
afa56e0102
session: Use defines for ssh_handle_packets().
2011-09-17 10:38:08 +02:00
Andreas Schneider
06e0305100
server: Fix some build warnings.
2011-09-11 15:32:39 +02:00
Andreas Schneider
95ec57f2fd
server: Fix compiler warning.
2011-09-11 15:12:35 +02:00
Aris Adamantiadis
20f8e73e3e
Update libssh to ssh_handle_packets_termination
...
cherry-picked from 0cb5248
Should resolve all timeout problems
Conflicts:
src/auth.c
src/channels.c
2011-09-02 13:58:37 +03:00
Andreas Schneider
822c68eb8e
pki: Use consistent API for ssh_pki_export_privkey_to_pubkey().
2011-08-30 10:28:57 +02:00
Andreas Schneider
60b92e458e
pki: Use consistent API for ssh_pki_export_pubkey_blob().
2011-08-30 10:16:53 +02:00
Andreas Schneider
5cf23522de
keyfiles: Remove keyfiles.h.
2011-08-28 14:26:40 +02:00
Andreas Schneider
892cb92f57
auth: Prefix kbdint functions.
2011-08-25 16:26:12 +02:00
Andreas Schneider
e94b0f8c08
server: Fix a build warning.
...
Thanks to Tom Judge.
2011-08-23 15:15:28 +02:00
Andreas Schneider
8c8a91a9b7
server: Migrate more functions to new pki.
2011-08-22 18:41:47 +02:00
Andreas Schneider
90167f09d3
server: Migrate hostkey check to new pki.
2011-08-22 15:22:58 +02:00
Andreas Schneider
4de4520559
server: Use new pki infrastructure.
2011-08-22 14:29:39 +02:00
rofl0r
af85337f5f
session: Fix timeout handling.
...
-2 now means to use the timeout specified in options. It wasn't used
earlier and poll only knows -1 and 0 anyway for special meanings.
2011-08-06 11:12:02 +02:00
Aris Adamantiadis
da954c2c5e
Fixes the ssh_log issue on ssh_bind handles.
2011-07-19 22:16:28 +02:00
milo
7cc4471168
Implemented X11 server side
2011-04-14 14:05:44 +02:00
milo
a0a3ceeaa0
Semantic fix on malloc
2011-04-14 13:46:40 +02:00
milo
23b28a573c
Fix a 0 bytes malloc in server kbdint implementation
2011-04-14 13:31:11 +02:00
Andreas Schneider
7e4916cefc
server: Fixed a possible NULL pointer dereference.
2011-04-14 10:10:19 +02:00
Oliver Stöneberg
166ee451c5
build: Fixed some VS2010 problems.
2011-04-11 11:18:57 +02:00