summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gssapi: ssh_gssapi_set_creds() is a client side functionStef Walter2014-10-121-2/+4
| | | | | | | It should not be guarded by the WITH_SERVER #ifdef Signed-off-by: Stef Walter <stefw@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* Check return code of connect(2).William Orr2014-10-121-1/+9
| | | | | Signed-off-by: William Orr <will@worrbase.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pki_gcrypt: Initialize 'type_c' in 'pki_do_sign_sessionid'Artyom V. Poptsov2014-10-021-0/+1
| | | | | | | | | | | Add missing initialization of 'type_c' field of a SSH signature in 'pki_do_sign_sessionid' procedure. If libssh is compiled with GCrypt, 'dh_handshake_server' fails with "Could not sign the session id" error. The change fixes that. Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* server: fix auth_interactive_request replyJon Simons2014-10-021-1/+1
| | | | | | | | Fix a missing 'buffer_pack' formatter in 'ssh_message_auth_interactive_request'. With this fix the 'examples/samplesshd-kbdint' program is working again for me. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* ed25519: fix leak in pki_ed25519_signJon Simons2014-10-021-2/+2
| | | | | Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pki: check ssh_buffer_pack return in ssh_pki_do_signJon Simons2014-10-021-5/+10
| | | | | | | Check the 'ssh_buffer_pack' return in ssh_pki_do_sign for the ED25519 case. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pki: fail when pubkey buffer length is not ED25519_PK_LENJon Simons2014-10-021-1/+5
| | | | | | | | | Fail fast in 'pki_import_pubkey_buffer' for the ED25519 case if a buffer sized ED25519_PK_LEN can not be retrieved. Before, the 'memcpy' could have read beyond the bounds of 'ssh_string_data(pubkey)'. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* crypto: check malloc return in ssh_mac_ctx_initJon Simons2014-10-022-2/+10
| | | | | Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* wrapper: fix z_stream leakJon Simons2014-10-021-0/+3
| | | | | | | | Ensure to free the z_stream structures as allocated from the gzip.c initcompress, initdecompress functions. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* string: Correctly burn the string buffer.Andreas Schneider2014-09-151-4/+5
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* ed25519: Generate, sign and verify keys.Aris2014-09-074-2/+441
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* crypto: Add ed25519 implementation from OpenSSH.Aris Adamantiadis2014-09-076-0/+2240
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* base64: Use a secure buffer.Aris Adamantiadis2014-09-071-0/+5
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* buffer: Add a secure buffer mechanism to avoid memory spillsAris Adamantiadis2014-09-071-9/+40
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* buffer: Implement "t" for text in ssh_buffer_pack().Aris Adamantiadis2014-09-071-1/+8
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* dh: Fix packing a pointer into the buffer.Andreas Schneider2014-08-251-2/+2
| | | | | | Thanks to Giovanni Panozzo <giovanni@panozzo.it>. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* ec: Fix build on CentOS.Andreas Schneider2014-08-182-0/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* auth: Fix a memory leak in agent publickey auth.Andreas Schneider2014-08-151-1/+2
| | | | | | | CID: 1230358 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* packet: Check return value of ssh_buffer_unpack().Andreas Schneider2014-08-151-7/+16
| | | | | | | CID: 1230357 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* messages: Check return value of ssh_buffer_unpack().Andreas Schneider2014-08-151-1/+6
| | | | | | | CID: 1230356 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* buffer: Make sure rc is initialized.Andreas Schneider2014-08-151-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* libgcrypt: Fix initializer name.Andreas Schneider2014-08-151-22/+22
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* bignum: Add missing include.Andreas Schneider2014-08-151-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* messages: Fix two ssh_buffer_unpack().Andreas Schneider2014-08-071-10/+11
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* Fix sftp endianess bugsAris Adamantiadis2014-08-061-29/+32
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* bignums: detach bignum-related functions from dh.c.Aris Adamantiadis2014-08-065-72/+98
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* crypto: fix secure burning, structure members namingAris Adamantiadis2014-08-061-5/+4
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffer: add a hidden canary to detect format errorsAris Adamantiadis2014-08-061-3/+16
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt sftpserver.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-73/+41
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt sftp.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-374/+226
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt session.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-37/+15
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt server.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-178/+108
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* buffers: adapt pcap.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-96/+53
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt ecdh.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-23/+9
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt packet.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-13/+12
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt messages.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-425/+161
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt gssapi.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-133/+47
|
* buffers: adapt curve25519.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-15/+8
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt client.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-28/+14
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffers: adapt channels.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-406/+201
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffer: adapt dh.c to new ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-96/+40
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffer: adapt kex.c to new ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-11/+13
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* buffer: adapt auth.c to ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-451/+91
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* Buffer: add ssh_buffer_(un)pack()Aris Adamantiadis2014-08-061-0/+295
| | | | | | | That function permits chaining of buffer values to minimize buffer handling in packet sending code. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* log: Add check for return value.Andreas Schneider2014-06-101-0/+4
| | | | | For some reason I got a segfault in gdb here. Make sure it works correctly.
* session: fix ssh_session->srv.ecdsa_key leakJon Simons2014-05-281-0/+4
| | | | | Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* cmake: Fix the build on Windows.Andreas Schneider2014-05-271-66/+68
|
* pki: Fix build without ECC support.Andreas Schneider2014-05-091-0/+5
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* kex: NULL checks for 'first_kex_packet_follows'Jon Simons2014-05-061-11/+17
| | | | | | | | Add NULL checks to 'is_first_kex_packet_follows_guess_wrong' to ensure that a 'strdup(NULL)' path can not be taken. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* messages: Add missing ntohl on X11 request screen numberAlan Dunn2014-05-061-1/+3
| | | | | | | BUG: https://red.libssh.org/issues/160 Signed-off-by: Alan Dunn <amdunn@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>