aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-12-21config: glob support for include with testNoName1152-1/+69
Signed-off-by: NoName115 <robert.kolcun@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15config: support for MACsJakub Jelen3-1/+23
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15tests/config: Text KexAlgorithms parsing in ssh_configJakub Jelen1-1/+5
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15tests/options: Verify key exchange algorithms are set properlyJakub Jelen1-0/+29
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15config: Set global log level from configuration fileJakub Jelen1-5/+10
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15options: Typo. The expand character is %dJakub Jelen1-1/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15config: Remove MAC option (SSHv1)Jakub Jelen1-9/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15config: Add configuration options from current OpenSSH 7.5 (and fix typos)Jakub Jelen1-13/+17
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15options: Document SSH_OPTIONS_GLOBAL_KNOWNHOSTS and set default valueJakub Jelen1-1/+18
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15Add new optionsAris Adamantiadis9-19/+343
Pair-Programmed-With: Jakub Jelen <jjelen@redhat.com> Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15tests: Temporarily build chroot_wrapperJakub Jelen2-1/+18
2017-12-15tests: Do not generate pcap file by defaultJakub Jelen1-1/+4
pcap file is generated by the processes writing to the sockets, which is not allowed for privilege-separated process in new OpenSSH servers (confined by seccomp filter). Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15tests: Give server more time to startJakub Jelen1-1/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-12-15tests: Do not test blowfish ciphers with OpenSSH 7.6 and newerJakub Jelen2-0/+8
2017-11-16client: Add missing language tag in disconnect messageAndreas Schneider1-2/+3
Fixes T74 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-09test: ssh_userauth_kbdint_setanswer() does not network interactionAndreas Schneider1-3/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-09sftp: Check for NULL path and give correct errorAndreas Schneider1-0/+5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-08examples: Build server examples on Linux tooAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-08pki_crypto: Avoid potential memory leakJakub Jelen1-1/+3
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-07examples: Rename samplessh to ssh-clientAndreas Schneider2-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-07doc: Missing new Host Key algorithmsJakub Jelen1-1/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-07doc: Missing new MAC algorithms in documentationJakub Jelen1-1/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-07doc: Missing new ECDH algorithms in documentationJakub Jelen1-1/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-11-07pki_crypto: Avoid segfault with OpenSSL 1.1.0Jakub Jelen1-0/+4
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-29ecdh: fix build for old libgcryptJon Simons1-2/+2
Summary: Fix a typo for old libgcrypt builds `k_length` -> `k_len`. Signed-off-by: Jon Simons <jon@jonsimons.org> Test Plan: * Spotted this last-minute typo bug in local testing. Reviewers: asn Reviewed By: asn Differential Revision: https://bugs.libssh.org/D10
2017-10-29ecdh: fix build for old libgcryptJon Simons1-2/+2
Summary: Fix a typo for old libgcrypt builds `k_length` -> `k_len`. Signed-off-by: Jon Simons <jon@jonsimons.org> Test Plan: * Spotted this last-minute typo bug in local testing. Reviewers: asn Differential Revision: https://bugs.libssh.org/D10
2017-10-29dh: Don't use deprecated function with newer OpenSSLAndreas Schneider1-0/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-29pki_crypto: Don't use deprecated function with newer OpenSSLAndreas Schneider1-0/+13
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-29torture_algorithms: deduplicate kex method passesJon Simons1-90/+49
Summary: Signed-off-by: Jon Simons <jon@jonsimons.org> Test Plan: * Re-ran the `torture_algorithms` test. Reviewers: asn Reviewed By: asn Tags: #libssh Differential Revision: https://bugs.libssh.org/D8
2017-10-29torture_algorithms: deduplicate kex method passesJon Simons1-90/+49
Summary: Signed-off-by: Jon Simons <jon@jonsimons.org> Test Plan: * Re-ran the `torture_algorithms` test. Reviewers: asn Tags: #libssh Differential Revision: https://bugs.libssh.org/D8
2017-10-29server: expose 'ssh_server_init_kex' APIJon Simons2-6/+39
Expose an API 'ssh_server_init_kex' which allows one to change the set of key exchange, hostkey, ciphers, MACs, and compression algorithms currently configured for the ssh_session at hand, after having started the 'ssh_handle_key_exchange' process. One can use this API from the already-existing 'connect_status_function' callback to dynamically modify the set of algorithms used after having received the client banner, but before sending out the initial KEXINIT message. For example, one might want to prevent advertising the curve25519 key exchange algorithm for older OpenSSH clients due to interop bugs. Fixes T25 Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-28Fix config.h includesAndreas Schneider47-21/+92
We need stdlib.h and string.h in priv.h for free() and memset(). Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-12cmake: Fix parsing the gcrypt versionAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-12cmake: Bump version numbersAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11README.Coding: Add section about pointersAndreas Schneider1-0/+21
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11sftp-server: Fix LIBSSH_APIDavidWed1-10/+10
Fixes T44 Signed-off-by: DavidWedderwille <davidwe@posteo.de> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11pkd_daemon.c: force close pkd_state.server_fd upon stopJon Simons1-0/+1
There's a race window between the accept loop's call to accept(2) and it checking `ctx.keep_going`. Forcefully close the server socket such that any raced `accept` ends up failing. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11pkd_daemon.c: split final close loop; wait for client to closeJon Simons1-2/+12
Sometimes, but not always, the pkd tests will fail because they close the socket at hand a bit too early for the client. The client in turn may exit non-zero when that happens. Split up the final close loop so that pkd waits to receive a channel close from the client, and then socket close, before finally returning. With this change I observe that tests are now passing in environments that would previously tickle the above race and fail. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11pkd_hello.c: fix return code upon test failureJon Simons1-4/+5
Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11auth: fix double-free in ssh_userauth_agent_publickeyJon Simons1-0/+1
Fixes T72 Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-09-11config: fix memory leak with repeated opcodesJon Simons2-1/+21
Fix a memory leak in the path where parsing returns early due to seeing a repeated opcode. A testcase is added which demonstrates the leak and fix with valgrind. Resolves CID 1374267. Signed-off-by: Jon Simons <jon@jonsimons.org>
2017-08-25match: Add missing return statementAndreas Schneider1-0/+1
This makey the compiler happy. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-25examples: Fix fallthrough compiler warningsAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-25packet: Fix fallthrough compiler warningsAndreas Schneider2-1/+9
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-25cmake: Add check for fallthrough attributeAndreas Schneider2-0/+29
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-24ecdh: enable ecdh_sha2_nistp{384,521} kex methodsJon Simons11-12/+184
Summary: Based on Dirkjan's original patch series here: * https://www.libssh.org/archive/libssh/2015-08/0000029.html Here the changes are adapted for the current master branch, and expanded to include libgcrypt support. Co-Authored-By: Dirkjan Bussink <d.bussink@gmail.com> Signed-off-by: Jon Simons <jon@jonsimons.org> Test Plan: * Ran pkd tests for libcrypto and libgcrypt builds. * Ran client torture_algorithms.c tests for libcrypto and libgcrypt builds. * Tested across multiple libgcrypts ("1.6.3" and "1.7.6-beta"). Reviewers: aris, asn Reviewed By: asn Tags: #libssh Differential Revision: https://bugs.libssh.org/D7
2017-08-24ecdh: enable ecdh_sha2_nistp{384,521} kex methodsJon Simons11-12/+184
Summary: Based on Dirkjan's original patch series here: * https://www.libssh.org/archive/libssh/2015-08/0000029.html Here the changes are adapted for the current master branch, and expanded to include libgcrypt support. Co-Authored-By: Dirkjan Bussink <d.bussink@gmail.com> Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Test Plan: * Ran pkd tests for libcrypto and libgcrypt builds. * Ran client torture_algorithms.c tests for libcrypto and libgcrypt builds. * Tested across multiple libgcrypts ("1.6.3" and "1.7.6-beta"). Reviewers: aris, asn Tags: #libssh Differential Revision: https://bugs.libssh.org/D7
2017-08-24options: Use ssh_key_type_e in ssh_options_set_algo()Andreas Schneider2-15/+19
Review with 'git show -b' Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-24kex: Use ssh_kex_types_e in ssh_verify_existing_algo()Andreas Schneider2-3/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-24torture_options: test the setting of ciphers and MACsNikos Mavrogiannopoulos1-0/+40
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>