summaryrefslogtreecommitdiffstats
path: root/src/packet.c
Commit message (Collapse)AuthorAgeFilesLines
* packet: elide two buffer_prepend calls into oneJon Simons2014-03-271-8/+9
| | | | | | | | | | | | | | In packet_send2, rather than issue two separate buffer_prepend_data calls (each of which may entail realloc + memmove + memcpy), elide the prepend work into a single buffer_prepend_data: the header information is computed locally, and a single 5 byte prepend operation is now done instead of prepending 1, then 4 bytes. Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit aa05248ca81e3bd9e949ad724d45518707446e2c) Conflicts: src/packet.c
* packet: Improve readablity of packet decrypt.Andreas Schneider2014-02-061-6/+7
| | | | | | | After discussion with Aris and it was not obvious enough to understand the issue we decided to refactor it. Reviewd-by: Aris Adamantiadis <aris@0xbadc0de.be>
* packet: Do not decrypt zero length rest of bufferAlan Dunn2014-02-061-7/+12
| | | | | | | | | | | | | | | | | | | | | | | If we receive a packet of length exactly blocksize, then packet_decrypt gets called on a buffer of size 0. The check at the beginning of packet_decrypt indicates that the function should be called on buffers of at least one blocksize, though the check allows through zero length. As is packet_decrypt can return -1 when len is 0 because malloc can return NULL in this case: according to the ISO C standard, malloc is free to return NULL or a pointer that can be freed when size == 0, and uclibc by default will return NULL here (in "non-glibc-compatible" mode). The net result is that when using uclibc connections with libssh can anomalously fail. Alternatively, packet_decrypt (and probably packet_encrypt for consistency) could be made to always succeed on len == 0 without depending on the behavior of malloc. Thanks to Josh Berlin for bringing conneciton failures with uclibc to my attention. Signed-off-by: Alan Dunn <amdunn@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* update copyright informationAris Adamantiadis2014-01-071-1/+1
|
* packet: Remove logically dead code.Andreas Schneider2013-11-271-3/+1
| | | | CID #1128796
* packet: Remove dead code.Andreas Schneider2013-11-141-6/+0
|
* packet: Set the packet to the processed data position.Andreas Schneider2013-11-141-1/+1
| | | | Else we could end up with packet - current_macsize if to_be_read is 0.
* packet: Refactor ssh_packet_socket_callback().Andreas Schneider2013-11-131-156/+201
| | | | Make error checking more readable and add additional NULL checks.
* gassapi: Fix check if it is enabled.Andreas Schneider2013-07-221-1/+1
|
* src: Remove enter_function() and leave_function().Andreas Schneider2013-07-141-21/+9
|
* src: Migrate to SSH_LOG.Andreas Schneider2013-07-141-9/+10
|
* server: Fix compilation without WITH_SERVERAris Adamantiadis2013-07-141-3/+11
|
* cmake: Make GSSAPI optional.Andreas Schneider2013-07-131-0/+4
|
* auth: implement client-side gssapiAris Adamantiadis2013-07-131-0/+1
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* auth: adapt libssh to gssapi-with-mic serverAris Adamantiadis2013-07-131-3/+10
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* src: Add fall trough comments.Andreas Schneider2013-06-181-0/+1
|
* packet: Fix a possible segfault.Andreas Schneider2013-06-171-7/+6
|
* packet: Check return values of buffer functions.Andreas Schneider2012-10-091-2/+8
| | | | Found by Coverity.
* packet: Fix a possible segfault.Andreas Schneider2012-10-051-3/+7
|
* build: Fix missing struct in_addr warning.Andreas Schneider2012-07-171-0/+1
|
* packet: Make default_packet_handlers static.Andreas Schneider2012-02-191-1/+1
| | | | Fixes sparse warnings.
* packet: Use a define for the macsize.Andreas Schneider2011-11-091-5/+4
|
* packet: cleaner logs with less redundant infoAris Adamantiadis2011-10-031-29/+14
|
* build: Fix zlib support.Andreas Schneider2011-09-231-4/+4
|
* gzip: Fix zlib support.Andreas Schneider2011-09-181-2/+2
|
* packet: Don't (de)compress empty buffers.Andreas Schneider2011-06-111-2/+6
| | | | This fixes bug #50.
* packet: Abort session on fatal errors on packetsAris Adamantiadis2011-06-091-1/+3
|
* Added the keyboard-interactive authentication methodmilo2011-02-101-1/+1
|
* TODO server: Fixed server support.Andreas Schneider2010-12-181-0/+4
|
* Removed references to ssh_buffer_get_beginAris Adamantiadis2010-10-031-9/+9
|
* Handle global requests and reverse forwardingmilo2010-10-021-1/+1
|
* First step getting rid of ssh_buffer_get_beginAris Adamantiadis2010-10-011-2/+2
|
* Fixed outgoing flow control + writes behavioursAris Adamantiadis2010-09-261-3/+0
|
* misc: Rename libssh/ to src/Andreas Schneider2010-09-061-0/+529