aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2017-06-07tests: fix buffer overflow in testcaseAris Adamantiadis1-1/+1
2017-04-11server: Add option SSH_BIND_OPTIONS_IMPORT_KEY to serverAlfredo Mazzinghi1-0/+52
This sets the bind private key directly from an ssh_key struct instead of reading a file. Signed-off-by: Alfredo Mazzinghi <am2419@cl.cam.ac.uk> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-08tests: Fix session management of torture_knownhostsAndreas Schneider1-6/+10
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-07tests: Fix typo in torture_cryptoAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-06cmake: Correctly check for sys/[u]time.hAndreas Schneider1-0/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-05callbacks: Add support for MSVCAndreas Schneider1-2/+2
__typeof__ is GCC specific Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-05tests: Fix memory leak in torture_auth_certAndreas Schneider1-3/+0
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04tests: Fix memory leak in torture_callbacksAndreas Schneider1-0/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04tests: Reset output buffer in torture_cryptoAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04tests: Some cleanup for torture_pkiAndreas Schneider1-2/+5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04tests: Fix memory leak in torture_auth_certAndreas Schneider1-3/+0
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04tests: Fix memory leaks in torture_knownhostsAndreas Schneider1-0/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-04tests: Fix build warning with pkd_hello and cmocka 1.1.0Andreas Schneider1-1/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-03tests: Disable x11 test which fails too oftenAndreas Schneider1-3/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-10-08tests: Add test for sftp_fsync()Andreas Schneider2-1/+132
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-10-08torture: Add support to specify verbosity level via env variableAndreas Schneider1-1/+8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-09tests: Try to fix the x11 testAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-09tests: Fix buffer test without NARG macro supportAndreas Schneider1-0/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-03tests: Improve the torture_request_env testAndreas Schneider1-3/+3
This still doesn't work on FreeBSD Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-03torture: Fix a warningAndreas Schneider1-47/+47
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02tests: Add test for ssh_callbacks_iterate()Aris Adamantiadis1-1/+52
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02tests: Add unit test for ssh_callbacks_execute_listAris Adamantiadis1-0/+86
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-05-02osx: fix compilationAris Adamantiadis1-2/+8
2016-03-21tests: Make test suite work out of the box on DebianJustus Winter1-9/+14
* tests/torture.c (torture_setup_create_sshd_config): Rework how the location of the sftp server is discovered, and add the Debian-specific location. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-21torture: Fix guardJustus Winter1-1/+1
* tests/unittests/torture_pki.c (setup_ecdsa_key*): Check for 'HAVE_ECC' instead of 'HAVE_OPENSSL_ECC'. Signed-off-by: Justus Winter <justus@g10code.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-17cmake: Fix torture buildAndreas Schneider1-1/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-17cmake: Try to fix FindArgp moduleAndreas Schneider1-4/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-15torture_auth: Add tests for client side certificate authenticationAxel Eppe7-0/+178
- enabled TrustedUserCAKeys option in torture.c - adds a new set of (signed) keys for bob in a separate dir The private key used to generate the certs is included, but not required. Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-08torture: Use ECDSA key for x11 testAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-08torture: Fix ssh version detectionAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-03tests: Fix running ssh-agentAndreas Schneider3-5/+32
ssh-agent needs to be executed as the local user and not a fake user or we will not be able to add identies. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-03torture: Set sshd debug level to DEBUG3Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-03tests: Switch to user bob in setupAndreas Schneider3-0/+34
This makes sure we can apply options correctly. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-03tests: Always start tests as root so we can switch to a userAndreas Schneider2-3/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-03tests: Use different uids and gids for testingAndreas Schneider2-3/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-21torture: Also write stderr to a fileAndreas Schneider1-2/+2
This allows to capture debug information of the wrappers. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-21torture: Add additional sftp-server path for BSDAndreas Schneider1-2/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-21torture: Give sshd more time to startAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: do not use ssh_buffer_get_rest_len()Fabiano Fidêncio1-11/+11
As ssh_buffer_get_len() actually calls ssh_buffer_get_rest_len(), let's just use the first one. This is a preparatory step for removing ssh_buffer_get_rest_len(). Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19buffer: rename ssh_buffer_get_rest() to ssh_buffer_get()Fabiano Fidêncio1-6/+6
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19tests: Fix warning about expected format for printfFabiano Fidêncio1-2/+2
/home/ffidenci/src/upstream/libssh/tests/benchmarks/bench_scp.c: In function ‘benchmarks_scp_down’: /home/ffidenci/src/upstream/libssh/tests/benchmarks/bench_scp.c:112:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("Only %d bytes available (on %lu requested).\n",size,bytes); ^ /home/ffidenci/src/upstream/libssh/tests/benchmarks/bench_scp.c:116:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("File is %d bytes (on %lu requested). Will cut the end\n" ,size,bytes); Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the buffer (non-static) functionsFabiano Fidêncio1-35/+35
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19cleanup: use ssh_ prefix in the agent (non-static) functionsFabiano Fidêncio1-2/+2
Having "ssh_" prefix in the functions' name will avoid possible clashes when compiling libssh statically. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19tests: Initialize output and iv in torture_cryptoAndreas Schneider1-3/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19valgrind: Add suppression for glibc dlopen issueAndreas Schneider1-0/+8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-19torture: Fix a memory leakAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-18torture: Add missing include for AF_INETAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-18tests: Require pam_wrapper 1.0.1Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-18tests: Wait for sshd to start before connectingAndreas Schneider1-0/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-01-14tests: Turn on kbdint tests in torture_authAndreas Schneider1-4/+0
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>