64 Commits

Author SHA1 Message Date
Markus Friedl
011c12f689 sync cvs as of 2012-12-14 (keep cipher-ctr.c) 2012-12-30 09:09:52 +01:00
Markus Friedl
575e4cb99d replace CipherContext typedef with 'struct sshcipher_ctx' 2012-10-12 18:02:59 +02:00
Markus Friedl
337493a508 replace Cipher typedef with 'struct sshcipher' 2012-10-12 17:58:02 +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
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
472fc6a429 packet.c: convert to sshbuf_froms() 2012-10-10 23:04:56 +02:00
Markus Friedl
c0624b12c7 check sshbuf_mutable_ptr return value, or convert to sshbuf_ptr 2012-10-10 01:25:20 +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
96b8844e9e sync cvs as of 2012-10-05 2012-10-05 14:40:20 +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
23f31b72d2 sshpkt_put_u8 should touch the OUTGOING buffer 2012-09-20 11:15:46 +02:00
Markus Friedl
383e471d75 PACKET_SKIP_COMPAT2 for sshconnect2.c 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
Damien Miller
2a99b71b39 Include CRC compensation attack detector in per-transport state structure 2012-09-17 21:41:05 +02:00
Markus Friedl
e3403f3457 update to openssh-6.1 2012-07-30 20:41:29 +02:00
Markus Friedl
faaf51919a free the internal state in ssh_packet_close() 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
f7ecade3a0 make sshbuf_get_stringb() a public API 2012-03-04 21:19:24 +01:00
Markus Friedl
ef966564df zero *kexp in kex_from_blob() 2012-03-04 21:19:24 +01:00
Markus Friedl
cfa5a3fa83 kex_from_blob(): don't leak the kex on error 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
b039f2339c don't make packet.c depend on the channels.c code 2012-03-04 21:19:23 +01:00
Markus Friedl
91f929fc6f de-fatal deattack and use sshbuf.h instead of misc.c 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
ce73007d5b create struct ssh in ssh_connect() and pass it to ssh_login(),
ssh_exchange_identification(), ssh_kex2() and ssh_userauth2()
so we can avoid accessing the global connections state from there.
2012-03-04 21:19:21 +01:00
Markus Friedl
d9fd38c3a2 unbreak privsep by resetting the rekeying flag after authentication for now 2012-03-04 21:19:21 +01:00
Markus Friedl
2c632c1123 print full input buffer if packet size contains garbage (PACKET_DEBUG) 2012-03-04 21:19:20 +01:00
Markus Friedl
57cc6bbbe5 ssh_packet_send2() needs to queue pkts until initial kex is done.
fixes ssh-proxy w/ dropbear client
2012-03-04 21:19:20 +01:00
Markus Friedl
6da9f87abc add new error messages for protocol version and hostkey loading 2012-03-04 21:19:19 +01:00
Markus Friedl
d04408425a de-fatal packet_close(): cipher_cleanup() send and receive context
even if cleanup for the first fails
2012-03-04 21:19:19 +01:00
Markus Friedl
01f9f4bfb4 de-fatal ssh_packet_{send2_wrapped,read_poll2} 2012-03-04 21:19:18 +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
Markus Friedl
b618c7766b packet_read_poll*: switch from ssh_packet_get to sshpkt_get + return codes 2012-01-17 14:44:19 +01:00
Markus Friedl
679bcc093b packet.c: {get,put}_u32 -> {PEEK,POKE}_U32 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
Markus Friedl
85054aaf18 merge "defatal mac.[ch]" from djm
Conflicts:

	ssh/packet.c
2012-01-17 14:43:39 +01:00
Markus Friedl
568a12a63e defatal mac.[ch]
Conflicts:

	ssh/packet.c
2012-01-17 14:42:52 +01:00