Markus Friedl
b8e501f9e3
ssh->current_keys is redundant, replace with ssh->kex->newkeys
2012-10-12 17:36:33 +02:00
Markus Friedl
ad4ef1067c
replace Kex typedef with 'struct kex'
2012-10-12 16:22:45 +02:00
Markus Friedl
cfee790064
ssh_api: add copyright
2012-10-12 16:06:03 +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
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