Commit Graph

32 Commits

Author SHA1 Message Date
Damien Miller
5020b06a6b remove the last traces of the old buffer API
yay :)
2012-09-21 05:35:30 +10:00
Markus Friedl
9e7303d250 don't leak the hostkey-list in ssh_free() ...
as well as the pub-key variant of the private hostkey
2012-03-07 00:26:55 +01:00
Damien Miller
4a3c3a7baf fix some kex-related leaks 2012-03-07 00:26:54 +01: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
b8e9499508 ssh_api.h: u_int -> size_t 2012-03-04 21:19:24 +01:00
Markus Friedl
fbeeedc2c2 print protocol mismatch message if version exchange fails 2012-03-04 21:19:24 +01:00
Markus Friedl
6e99587584 remove redundant ssh->compat assignment 2012-03-04 21:19:24 +01:00
Markus Friedl
e9505646d7 terminate the buffer for the remote protocol version; interop w/JSch 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
dd6d702278 pass a struct sshkey to ssh_add_hostkey() (instead of a string) 2012-03-04 21:19:20 +01:00
Markus Friedl
eddb17399b ssh_api.c: the client must not send anything before the protocol version 2012-03-04 21:19:20 +01:00
Markus Friedl
91fa188bfb ssh_packet_next(): after a kex callback has been called we need to
get the next packet, too. otherwise we end up waiting for input
even if there is a packet ready. the same applies to the proxy
2012-03-04 21:19:20 +01:00
Markus Friedl
9608cea748 de-xmalloc ssh_api.c 2012-03-04 21:19:20 +01:00
Matthias Pitzl
53c9092076 Function to set a verify_host_key callback 2012-03-04 21:19:20 +01:00
Markus Friedl
b14028ba52 fix whiteo in ssh_api.[ch] 2012-03-04 21:19:19 +01:00
Markus Friedl
746db96b80 fix/move comment in ssh_packet_next 2012-03-04 21:19:19 +01:00
Markus Friedl
f046133614 de-fatal ssh_api.c and change API to return ssh-error codes (err.h) 2012-03-04 21:19:18 +01:00
Matthias Pitzl
b345cb35c8 Enable build of shared library libssh. 2012-03-04 21:19:18 +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
Markus Friedl
c037dfa962 deal with error-codes returned by dispatch function (fatal for now) 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
b720702ef3 unbreak ssh_add_hostkey(): sshkey_read() returns 0 on sucess 2012-01-17 14:37:26 +01:00
Markus Friedl
4f48a68397 rename ssh_packet_get() to ssh_packet_next() and document resulting API 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
7c423254e3 add ssh_free() to API and use it in the proxy 2012-01-17 14:32:48 +01:00
Markus Friedl
9f176fa427 don't forget to send the packet 2012-01-17 14:32:48 +01:00
Markus Friedl
81b6a34857 the host key verification callbacks always get a 'struct ssh *'
so change the prototypes accordingly (from void *).
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