42 Commits

Author SHA1 Message Date
Markus Friedl
976812280c packet.h: remove include of cipher.h 2012-10-12 18:05:47 +02:00
Markus Friedl
7e29b55734 packet.h: replace include of key.h with forward declaration 2012-10-12 17:53:18 +02:00
Markus Friedl
2033d3b5ba packet.h: replace include of kex.h with forward declaration 2012-10-12 17:48:29 +02:00
Markus Friedl
b8e501f9e3 ssh->current_keys is redundant, replace with ssh->kex->newkeys 2012-10-12 17:36:33 +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
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
Markus Friedl
48278e629e remove remaining calls to packet_* 2012-09-21 12:07:07 +02:00
Damien Miller
d01ff4fdfa remove legacy packet_ calls from ttymodes.c 2012-09-21 19:59:25 +10:00
Markus Friedl
0a153a1e28 ssh.c: PACKET_SKIP_COMPAT 2012-09-21 00:58:36 +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
383e471d75 PACKET_SKIP_COMPAT2 for sshconnect2.c 2012-09-20 11:15:45 +02:00
Markus Friedl
0159ba24d4 ssh_packet_check_eom -> sshpkt_get_end 2012-09-20 11:15:45 +02:00
Markus Friedl
79d66b3de8 add sshpkt_get(), use it for the rsa-response 2012-09-19 14:55:31 +02:00
Markus Friedl
a3ba607c6e PACKET_SKIP_COMPAT2: make ssh_packet_put/get optional 2012-09-19 12:45:22 +02:00
Markus Friedl
e3403f3457 update to openssh-6.1 2012-07-30 20:41:29 +02:00
Markus Friedl
becc57491f ssh_set_app_data(): attach application specific data to 'struct ssh' 2012-03-04 21:19:24 +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
43a81ccd73 make get_remote_ipaddr() per-connection and move it to ssh_remote_ipaddr() 2012-03-04 21:19:23 +01:00
Markus Friedl
f8339e5505 de-fatal state serialisation and remove obsolete state-functions 2012-03-04 21:19:23 +01:00
Markus Friedl
63e255807e move packet state serialisation from monitor to packet.c 2012-03-04 21:19:23 +01:00
Markus Friedl
aac1adfc7b replace global 'datafellows' with new ssh->compat flag 2012-03-04 21:19:21 +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
b645f5761f defatal ssh_set_newkeys() & ssh_packet_enable_delayed_compress() 2012-03-04 21:19:18 +01:00
Markus Friedl
14d8f87192 de-fatal ssh_packet_{init,start}_compression() 2012-03-04 21:19:18 +01:00
Markus Friedl
f6bb12089e defatal compression code by merging it into packet.c
Conflicts:

	ssh/packet.c
2012-01-17 14:45:00 +01:00
Markus Friedl
6e36bbb8ae de-fatal ssh_packet_{start,stop}_discard() 2012-01-17 14:44:19 +01:00
Damien Miller
3ed152cd93 move cipher warning flag to session_state 2012-01-17 14:43:51 +01:00
Damien Miller
ef0c2e123f defatal cipher.[ch]
unbreak arcfour(128|256)
2012-01-17 14:37:27 +01:00
Markus Friedl
43f038abce ssh_packet_read_poll/seqnr now return an error and no longer use xmalloc 2012-01-17 14:37:27 +01:00
Markus Friedl
9e254e24c5 new sshpkt API: {get,put} wraps ssh_packet_{get,put}, adds {get_end,disconnect} 2012-01-17 14:37:27 +01:00
Damien Miller
44dce8d972 reinitialise compression buffers in postauth privsep child
the postauth privsep child never had its compression buffers initialised.
the old buffer code would would because they were (fortunately) bzeroed,
but the new code is more paranoid.

There is probably a more minimal way to do this that I'm missing :)
2012-01-17 14:37:26 +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
6e946b8c40 client userauth: packet_ -> ssh_packet_ and dispatch_ -> ssh_dispatch_
remove globals: move hostname/address for hostkey verification to 'struct ssh'
2012-01-17 14:32:47 +01:00
Markus Friedl
9ab2398fe8 remove unused packet_*() defines 2012-01-17 14:32:47 +01:00
Markus Friedl
6043e0c641 let packet_set_connection create the active_state, again 2012-01-17 14:32:47 +01:00
Markus Friedl
bb5f42a34e replace most of opacket.c with #defines 2012-01-17 14:32:47 +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