34 Commits

Author SHA1 Message Date
Markus Friedl
b8e501f9e3 ssh->current_keys is redundant, replace with ssh->kex->newkeys 2012-10-12 17:36:33 +02:00
Markus Friedl
12f57cf093 replace Comp typedef with 'struct sshcomp' 2012-10-12 16:56:40 +02:00
Markus Friedl
62dfdae606 replace Enc typedef with 'struct sshenc' 2012-10-12 16:51:58 +02:00
Markus Friedl
94db174dc6 replace Mac typedef with 'struct sshmac' 2012-10-12 16:45:42 +02:00
Markus Friedl
e92ff3d5b1 replace Newkeys typedef with 'struct newkeys' 2012-10-12 16:32:27 +02:00
Markus Friedl
ad4ef1067c replace Kex typedef with 'struct kex' 2012-10-12 16:22:45 +02:00
Markus Friedl
f72f4b214f replace sshbuf_new/sshbuf_put with sshbuf_from. 2012-10-10 23:49:31 +02:00
Damien Miller
60cb7a627f new functions for read-only buffers with external storage
This adds some new functions: sshbuf_from(), sshbuf_fromb() and sshbuf_froms()
that create new buffers from a read-only blob, the contents of a buffer and
the contents of a string in a buffer respectively. In all cases the memory
contents are not copied - the new buffer, which is read-only, just refers to
the original location in memory.
2012-10-09 23:22:53 +02:00
Damien Miller
5020b06a6b remove the last traces of the old buffer API
yay :)
2012-09-21 05:35:30 +10:00
Markus Friedl
fbbec84071 sync to cvs as of 2012-09-14 2012-09-14 18:59:11 +02:00
Markus Friedl
9fb8cdc7bd free the session id and version strings in kex_free() 2012-03-07 00:26:56 +01:00
Damien Miller
4a3c3a7baf fix some kex-related leaks 2012-03-07 00:26:54 +01:00
Markus Friedl
a9b5c1feef replace ssh_packet_payload() with sshpkt_ptr(); adapt ssh_packet_payload()
sshpkt_ptr() has similar argument/return types as sshbuf_ptr()
u_int -> size_t, void * -> u_char.
2012-03-04 21:19:24 +01:00
Markus Friedl
aac1adfc7b replace global 'datafellows' with new ssh->compat flag 2012-03-04 21:19:21 +01:00
Markus Friedl
1edbfe0a1b dump_digest(): wrap digest in sshbuf and use sshbuf_dump() 2012-03-04 21:19:20 +01:00
Markus Friedl
aec7620ee3 remove obsolete comment in kex_input_kexinit 2012-03-04 21:19:20 +01:00
Markus Friedl
f25d6cdfc8 rename kex_finish() to kex_send_newkeys() 2012-03-04 21:19:19 +01:00
Markus Friedl
c5b7f87669 missing de-fatal + remove blocking read from kex
replace ssh_packet_check_eom() with sshpkt_get_end() and remove
xmalloc as well as the blocking call to ssh_packet_read_seqnr().
this was used to skip the next packet. instead skip the packet now
in dispatch.c
2012-03-04 21:19:19 +01:00
Markus Friedl
19a6ad8184 de-fatal kex_ecdh_name_to_nid() 2012-03-04 21:19:19 +01:00
Damien Miller
b65245d55a finish conversion of kex.c
cleans up a few buffer_* calls and adjusts return values
2012-03-04 21:19:18 +01:00
Damien Miller
2828f179cc finish defatal of kex.c 2012-03-04 21:19:18 +01:00
Damien Miller
df7bb23744 defatal kex_send_kexinit 2012-01-17 14:45:06 +01:00
Markus Friedl
d1a86a640e remove kex_kexinit_finish; unbreak kex-ecdh 2012-01-17 14:44:19 +01:00
Markus Friedl
9b8ff0770c pass kex-setup errors back to kex_input_kexinit() 2012-01-17 14:44:19 +01:00
Markus Friedl
53217d6dcd let kex_derive_keys() return an error code, too. 2012-01-17 14:44:19 +01:00
Markus Friedl
5f2f99f51e let kex_finish() return an error code 2012-01-17 14:44:19 +01:00
Markus Friedl
585db2baab move kex-specific states to struct kex and release states in kex_free() 2012-01-17 14:37:26 +01:00
Markus Friedl
0e69e20693 dispatch_fn() now returns an error code (int) instead of void 2012-01-17 14:37:26 +01:00
Markus Friedl
c905073179 ssh_api.c: offer hostkey algorithms depending on registered keys
For now, the 'serialized' proposal is de-serialized, modified, and
serialized again in order to change the hostkey algorithm.
2012-01-17 14:36:45 +01:00
Damien Miller
ea5ceecdc2 first cut at merging disentangled buffer and library code. buffer_* continue
to exist as thin wrappers around sshbuf_*

doesn't yet pass regress (breakage in hostkey checking, probably related to
new sshkey_* return values)
2012-01-17 14:32:48 +01:00
Markus Friedl
c8197a3b42 change all protocol handlers from 'void *' to 'struct ssh *' 2012-01-17 14:32:48 +01:00
Markus Friedl
9cc85e2464 move packet state internals back from packet.h to packet.c 2012-01-17 14:32:46 +01:00
Markus Friedl
530367aafa Move the key exchange state and other global variables into
a per connection state struct, add a initial API that could
be used for a proxy (see ssh-proxy.c)

Joint work with Matthias Pitzl, Stefan Rinkes, Bernhard Zaun and
Arne Becker.
2012-01-17 14:32:46 +01:00
Markus Friedl
a87828ec88 import openssh as of 2012/01/05 2012-01-05 12:08:12 +01:00