summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* cmake: Require cmake version 2.8.0Andreas Schneider2015-04-101-5/+4
|
* cmake: Check for sys/param.h header fileAndreas Schneider2015-04-101-0/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* cmake: Check for arpa/inet.h header fileAndreas Schneider2015-04-101-0/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* external: Use standard int typesAndreas Schneider2015-04-102-67/+69
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* messages: Don't leak memory after callback executionAndreas Schneider2015-04-021-0/+19
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* poll: Fix compilation with struct ssh_timestampAndreas Schneider2015-04-021-1/+1
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* include: We should use __func__ which is C99Andreas Schneider2015-04-021-1/+1
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* Locally restart ssh_poll() upon EINTR.Seb Boving2015-02-231-1/+7
| | | | | | | BUG: https://red.libssh.org/issues/186 Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be> Signed-off-by: Sebastien Boving <seb@google.com>
* Sending EOF on Socket that received a Broken Pipe makes call to poll to hangxjoaalm2015-02-231-9/+18
| | | | | Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be> Signed-off-by: Joao Pedro Almeida Pereira <joao.almeida@blue-tc.com>
* buffer: buffer_pack & unpack on non-gnu compilersAris Adamantiadis2015-02-081-6/+14
|
* buffer: fix use-before-nullcheck (coverity #1267979)Aris Adamantiadis2015-02-031-2/+0
| | | | | Additionally, the function call was already existing after the NULL check
* Revert "pki_gcrypt: fix warnings for SSH_KEYTYPE_ED25519"Aris Adamantiadis2015-02-031-9/+0
| | | | | This reverts commit 10f71c67690cf3c0e1b6a733c3641407df2224e2. Commit was redundant with ed25519 branch
* base64: Use secure buffersAris Adamantiadis2015-02-021-0/+2
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* buffer: Abort if the canary is not intact in ssh_buffer_unpack()Andreas Schneider2015-02-021-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* buffer: buffer: Improve argument checking of in ssh_buffer_pack()Andreas Schneider2015-02-021-5/+28
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* buffer: Abort if the canary is not intact in ssh_buffer_unpack()Andreas Schneider2015-02-021-4/+4
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* buffer: Improve argument checking in ssh_buffer_pack()Andreas Schneider2015-02-021-5/+26
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* Move all 3rd-party C files to src/external/Aris Adamantiadis2015-02-027-97/+96
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* ed25519: Add support for OpenSSH encrypted container exportAris Adamantiadis2015-02-021-6/+153
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* ed25519: ADd OpenSSH encrypted container importAris Adamantiadis2015-02-022-8/+168
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* external: Add OpenSSH bcrypt and blowfish implementationAris Adamantiadis2015-02-023-0/+868
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* server: Add support for ed25519 keys in the server.Aris Adamantiadis2015-02-024-2/+29
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* kex: Add support for ed25519 on client connections.Aris Adamantiadis2015-02-021-4/+12
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* ed25519: Add support to export OpenSSH container keysAris Adamantiadis2015-02-022-10/+173
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* libgcrypt: Make the PEM parser ed25519 awareAris Adamantiadis2015-02-021-0/+54
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* libcrypto: Make the PEM parser ed25519 awareAris Adamantiadis2015-02-021-0/+6
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* ed25519: Add support o import OpenSSH container keysAris Adamantiadis2015-02-023-10/+278
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* kex: disable des-cbc-ssh1 by defaultAris Adamantiadis2015-01-261-4/+6
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* packet_cb: Add misssing include for ntohl().Andreas Schneider2015-01-211-0/+1
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* pki: Make sure sig is not used unintialized.Andreas Schneider2015-01-201-1/+1
| | | | | | BUG: https://red.libssh.org/issues/167 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* threads: Fix building with POSIX threads in MinGW.Andreas Schneider2015-01-201-1/+1
| | | | | | | | | | | | | | | BUG: https://red.libssh.org/issues/181 Originally written by Patrick von Reth <vonreth () kde ! org>. This patch is part of the larger patch: https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/changes/portage/win32libs/libssh/0002-add-a-way-to-test-ssh-connections-on-windows.patch MinGW (in particular, the MinGW-w64 fork) can use either posix threads or win32 threads. This patch fixes the MinGW build when using posix threads. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* channels1: Fix pty request stateYanis Kurganov2015-01-201-1/+2
| | | | | Signed-off-by: Yanis Kurganov <YKurganov@ptsecurity.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* connect: Fix a memory leak.Andreas Schneider2015-01-141-0/+1
| | | | | | | CID: #1238618 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* sftp: Fix a possible integer overflow.Andreas Schneider2015-01-141-2/+6
| | | | | | | CID: #1238630 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* sftp: Use a declared variable for data len.Andreas Schneider2015-01-141-6/+7
| | | | | | | CID: #1238632 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* sftp: Fix memory leak on realloc failureTobias Klauser2015-01-141-6/+9
| | | | | | | | | | If realloc of sftp->ext->name or sftp->ext->data fails, the memory previously allocated for the respective member is leaked. Fix this by storing the return value of realloc() in a temporary variable which only gets assigned to the respective sftp->ext member on success. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* connect: Fix mingw build.Andreas Schneider2015-01-061-0/+4
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* connect: Check that errno is 0 to fix Windows build.Andreas Schneider2014-12-251-1/+2
| | | | | | Thanks to Viktor Butskih. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* options: Fix setting the port.Andreas Schneider2014-12-255-9/+12
| | | | | | Make sure we correctly read the port from the config file. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* CVE-2014-8132: Fixup error path in ssh_packet_kexinit()Jon Simons2014-12-171-1/+6
| | | | | | | | | Before this change, dangling pointers can be unintentionally left in the respective next_crypto kex methods slots. Ensure to set all slots to NULL in the error-out path. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* libcrypto: Fix Windows build with ssh_reseed().Andreas Schneider2014-12-171-0/+5
| | | | | | | gettimeofday() is not available on Windows and we need it only in case of forking. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* config: Also tokenize on equal sign.William Orr2014-12-171-1/+1
| | | | | | | | The ssh config specifies it as a valid separator. BUG: https://red.libssh.org/issues/166 Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pki_gcrypt: fix DSA signature extractionJon Simons2014-12-091-3/+29
| | | | | | | | | | | | | | | | | Fix DSA signature extraction for the LIBGCRYPT build. Here, the same fix that was applied to the LIBCRYPTO build for https://red.libssh.org/issues/144 is now adapted for pki_gcrypt. Additionally, ensure to set the resulting output sig_blob buffer before returning. Before this fix, one can observe the failure with the pkd test on a LIBGCRYPT build as so: # ./pkd_hello -i 1 -t torture_pkd_openssh_dsa_dsa_default After, runs of 10000 back-to-back iterations of the same test are passing. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pki_gcrypt: fix warnings for SSH_KEYTYPE_ED25519Jon Simons2014-12-091-0/+9
| | | | | Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* bignum: no-op make_string_bn_inplace for LIBGCRYPTJon Simons2014-12-091-1/+3
| | | | | | | | Disable the 'make_string_bn_inplace' helper function for the LIBGCRYPT build, rather than using '#error' to fail the build completely. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* Set the correct error in ssh_options_set().Hani Benhabiles2014-12-051-2/+2
| | | | | Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* session: add getter for kexalgoJon Simons2014-12-051-0/+29
| | | | | Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pki_crypto.c: plug ecdsa_sig->[r,s] bignum leaksJon Simons2014-12-052-2/+11
| | | | | | | | | | | Per ecdsa(3ssl), ECDSA_SIG_new does allocate its 'r' and 's' bignum fields. Fix a bug where the initial 'r' and 's' bignums were being overwritten with newly-allocated bignums, resulting in a memory leak. BUG: https://red.libssh.org/issues/175 Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* connect: Do not fail if the connect is in progress.Andreas Schneider2014-10-151-1/+1
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* 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>