Andreas Schneider
6789170799
buffer: Abort if the canary is not intact in ssh_buffer_unpack()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-02-02 17:32:28 +01:00
Andreas Schneider
afc9988c93
buffer: Improve argument checking in ssh_buffer_pack()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-02-02 17:32:18 +01:00
Aris Adamantiadis
2490404d45
Move all 3rd-party C files to src/external/
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:53 +01:00
Aris Adamantiadis
fbdb940c46
ed25519: Add test for signatures and verification
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
c8d0b724b3
tests: Add ed25519 encrypted keys export
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
9e4700cdc0
ed25519: Add support for OpenSSH encrypted container export
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
b76d37b341
tests: Add ed25519 encrypted keys import
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
423fa6818b
ed25519: ADd OpenSSH encrypted container import
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
61e2c8f0f7
external: Add OpenSSH bcrypt and blowfish implementation
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
c02b260e7e
server: Add support for ed25519 keys in the server.
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
01a6004171
kex: Add support for ed25519 on client connections.
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
4f5660e081
tests: Add ed25519 OpenSSH key saving
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
46bc11f977
ed25519: Add support to export OpenSSH container keys
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
119840b0a9
tests: Add ed25519 OpenSSH key loading and operations
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
4343ac5b08
libgcrypt: Make the PEM parser ed25519 aware
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
6b9183a20b
libcrypto: Make the PEM parser ed25519 aware
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
3ec3a926e5
ed25519: Add support o import OpenSSH container keys
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
2f7886837f
pki.h: Replace tabs with spaces
...
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 14:45:52 +01:00
Aris Adamantiadis
7febad5821
kex: disable des-cbc-ssh1 by default
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-26 08:57:06 +01:00
Andreas Schneider
b235c380f2
packet_cb: Add misssing include for ntohl().
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-21 09:23:43 +01:00
Andreas Schneider
f6a50aff4c
tests: Fix torture_server_x11().
2015-01-21 09:19:30 +01:00
Alan Dunn
6b7f275c32
tests: Add torture_server_x11 test.
...
torture_server_x11 tests whether a libssh server can correctly parse an
X11 request.
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 20:23:19 +01:00
Alan Dunn
4bde48bb2e
tests: Add ssh server setup functionality
...
Add the ability to generate a keypair (RSA, but tests that focus on
what occurs over a connection may well not care) and an ssh_bind
easily.
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:50:52 +01:00
Alan Dunn
f4154c503b
tests: Add port option to torture_ssh_session
...
Signed-off-by: Alan Dunn <amdunn@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:41:53 +01:00
Léo Peltier
8db4520d89
cmake: Add libsshpp.hpp to the distributed headers list.
...
BUG: https://red.libssh.org/issues/163
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:32:48 +01:00
Andreas Schneider
9a7d450098
pki: Make sure sig is not used unintialized.
...
BUG: https://red.libssh.org/issues/167
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:31:12 +01:00
William Orr
7070117dc3
examples: Use safer names for stdin, stdout, stderr
...
BUG: https://red.libssh.org/issues/168
On some platforms, like OpenBSD, stdin and friends are macros which break
compilation of this struct. I've fixed these names such that it compiles and
runs cleanly on OpenBSD
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 19:27:14 +01:00
Andreas Schneider
433f8fd550
threads: Fix building with POSIX threads in MinGW.
...
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>
2015-01-20 19:01:15 +01:00
Yanis Kurganov
c6590bd189
channels1: Fix pty request state
...
Signed-off-by: Yanis Kurganov <YKurganov@ptsecurity.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20 18:58:13 +01:00
Andreas Schneider
929868c691
Update README.CodingStyle
2015-01-20 12:08:51 +01:00
Andreas Schneider
06a0d8ff1c
connect: Fix a memory leak.
...
CID: #1238618
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-01-14 15:20:52 +01:00
Andreas Schneider
af0dd3fb02
sftp: Fix a possible integer overflow.
...
CID: #1238630
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-01-14 15:20:49 +01:00
Andreas Schneider
ce02f6576a
sftp: Use a declared variable for data len.
...
CID: #1238632
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-01-14 15:20:46 +01:00
Andreas Schneider
68e720a3da
pkd: Make sure we do not pass -1 to close.
...
CID: #1245696
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-01-14 15:20:43 +01:00
Andreas Schneider
c224508bf8
pkd: Check return value of pkd_run_tests().
...
CID: #1245697
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2015-01-14 15:20:34 +01:00
Tobias Klauser
15d71a8c51
sftp: Fix memory leak on realloc failure
...
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>
2015-01-14 10:22:55 +01:00
Andreas Schneider
8536cd9808
cmake: Fix ntohll and htonll macro detection.
...
BUG: https://red.libssh.org/issues/164
Thanks to Ryan Schmidt!
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-13 08:53:42 +01:00
Tobias Klauser
353751e3e3
doc: Fix a typo in curve25519-sha256@libssh.org.txt
...
Fix the typo 'stengths' -> 'strengths' and remove the trailing white
space on the same line.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-13 08:45:51 +01:00
Andreas Schneider
159ef828dd
doc: Fix link to curve25519-sha256@libssh.org spec.
2015-01-06 15:24:30 +01:00
Andreas Schneider
3dd069c0c8
doc: Fix a typo, blank lines and trailing spaces.
2015-01-06 15:22:16 +01:00
Andreas Schneider
a198193723
connect: Fix mingw build.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-06 15:12:17 +01:00
Andreas Schneider
e051135a05
connect: Check that errno is 0 to fix Windows build.
...
Thanks to Viktor Butskih.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-25 12:34:59 +01:00
Andreas Schneider
bb18442fe8
options: Fix setting the port.
...
Make sure we correctly read the port from the config file.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-25 12:32:16 +01:00
Jon Simons
c2aed4ca78
CVE-2014-8132: Fixup error path in ssh_packet_kexinit()
...
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>
2014-12-17 19:45:09 +01:00
Andreas Schneider
b7b535816d
libcrypto: Fix Windows build with ssh_reseed().
...
gettimeofday() is not available on Windows and we need it only in case
of forking.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-17 19:39:18 +01:00
Andreas Schneider
d8e691b58a
cmake: Fix config variable names.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-17 10:38:56 +01:00
William Orr
52968b1a11
config: Also tokenize on equal sign.
...
The ssh config specifies it as a valid separator.
BUG: https://red.libssh.org/issues/166
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-17 10:34:27 +01:00
Jon Simons
b35f1f488c
pki_gcrypt: fix DSA signature extraction
...
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>
2014-12-09 19:21:47 +01:00
Jon Simons
10f71c6769
pki_gcrypt: fix warnings for SSH_KEYTYPE_ED25519
...
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-09 19:21:34 +01:00
Jon Simons
014fde0542
torture: fix warning for SSH_KEYTYPE_ED25519
...
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-12-09 19:21:18 +01:00