summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix return code of torture_initAndreas Schneider2015-09-091-1/+1
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Add tests for the new ssh_pki cert functionsAxel Eppe2015-09-072-0/+169
| | | | | Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Migrate pkd_hello to new cmocka APIAndreas Schneider2015-09-071-19/+33
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* pki: Use the standard logging functionAndreas Schneider2015-09-071-10/+0
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Migrate to new cmocka APIAndreas Schneider2015-09-0726-275/+395
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* cmake: Handle libssh threas library correctlyAndreas Schneider2015-09-072-7/+9
| | | | | | This should fix the build on Windows and would not install pkg files. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Add checks for ssh_key_is_private()Andreas Schneider2015-08-101-0/+30
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* fix permissionsAris Adamantiadis2015-07-081-0/+0
|
* cmake: Fix zlib include directoryAndreas Schneider2015-07-032-6/+6
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* cmake: Do not use CMAKE_(SOURCE|BINARY)_DIRDouglas Heriot2015-06-241-1/+1
|
* valgrind: Add suppression for openssl FIPS dlopen leakAndreas Schneider2015-05-061-0/+12
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* valgrind: Ignore valgrind free bug on exitAndreas Schneider2015-05-061-0/+12
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Migrate torture_keyfiles to testkey functionsAndreas Schneider2015-05-061-16/+31
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* torture: Move TORTURE_TESTKEY_PASSWORD to headerAndreas Schneider2015-05-062-2/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Fix memory leak in torture_server_x11 testAndreas Schneider2015-05-061-0/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Only link against threading library if availableAndreas Schneider2015-05-051-10/+14
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* cmake: Add missing OpenSSL include directoryAndreas Schneider2015-05-051-0/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Apply umask before calling mkstemp()Andreas Schneider2015-05-052-1/+8
| | | | | | CID: #978660 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Fix ctest default scriptAndreas Schneider2015-05-041-4/+4
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* unittests: Fix memory leak in torture_pki_ed25519Andreas Schneider2015-04-021-0/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* torture: fix includes for freebsd10Aris Adamantiadis2015-02-141-1/+3
|
* tests: torture-misc: check for NULL return codesAris Adamantiadis2015-02-121-3/+17
| | | | | Use the LOGNAME environment variable if USER is not set, as it sometimes happens in cron jobs.
* tests: workaround for compiling with older cmockaAris Adamantiadis2015-02-121-0/+6
|
* tests: allow conditionnal execution on patternAris Adamantiadis2015-02-0225-26/+88
| | | | | | | | Option can be used to filter out irrelevant tests usage: ./torture_pki '*ed25519' Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* ed25519: Add test for signatures and verificationAris Adamantiadis2015-02-022-0/+122
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Add ed25519 encrypted keys exportAris Adamantiadis2015-02-021-0/+29
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Add ed25519 encrypted keys importAris Adamantiadis2015-02-022-1/+35
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Add ed25519 OpenSSH key savingAris Adamantiadis2015-02-021-4/+47
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Add ed25519 OpenSSH key loading and operationsAris Adamantiadis2015-02-022-2/+206
| | | | | Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Fix torture_server_x11().Andreas Schneider2015-01-213-4/+30
|
* tests: Add torture_server_x11 test.Alan Dunn2015-01-202-0/+214
| | | | | | | | 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>
* tests: Add ssh server setup functionalityAlan Dunn2015-01-202-0/+49
| | | | | | | | | 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>
* tests: Add port option to torture_ssh_sessionAlan Dunn2015-01-206-4/+12
| | | | | Signed-off-by: Alan Dunn <amdunn@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* pkd: Make sure we do not pass -1 to close.Andreas Schneider2015-01-141-1/+3
| | | | | | | CID: #1245696 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* pkd: Check return value of pkd_run_tests().Andreas Schneider2015-01-141-0/+3
| | | | | | | CID: #1245697 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* torture: fix warning for SSH_KEYTYPE_ED25519Jon Simons2014-12-091-0/+1
| | | | | Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: fix pkd build breakagesJon Simons2014-10-154-3/+9
| | | | | | | | | Fix a build breakage when '-DWITH_SERVER=OFF' is set: skip building the pkd test for that case. Add some missing includes for the OpenIndiana and FreeBSD builds. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: introduce pkd_helloJon Simons2014-10-1210-0/+1416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a sample public-key testing daemon to the 'pkd' test directory, and add support code for cycling through various combinations of different key exchange, cipher, and MAC algorithms. The goal of the 'pkd_hello' test is to make it easy to test interactions between non-libssh clients and a libssh-server, and to provide a starting point for testing new implementations for key types, ciphers, MACs, and so on. The thinking is that testing a new algorithm should be as simple as adding a new line for it in the PKDTESTS_* lists. Macros are used to generate the tests and helper functions for a couple of clients -- here, OpenSSH and dropbear are included for the first cut. If binaries are found for these clients, their test lists will be enabled; when binaries are not found for a given client, those tests are skipped. Tests are run in one large batch by default, but can also be run individually to help with tracking down things like signature bugs that may take many iterations to reproduce. Each test logs its stdout and stderr to its own file, which is cleaned up when a test succeeds. For failures, those logs can be combined with verbose libssh output from pkd itself to start debugging things. Some example usages: pkd_hello Run all tests with default number of iterations. pkd_hello --list List available individual test names. pkd_hello -i 1000 -t torture_pkd_openssh_ecdsa_256_ecdh_sha2_nistp256 Run only the torture_pkd_openssh_ecdsa_256_ecdh_sha2_nistp256 testcase 1000 times. pkd_hello -v -v -v -v -e -o Run all tests with maximum libssh and pkd logging. Included in the tests are passes for all existing kex, cipher, and MAC algorithms. BUG: https://red.libssh.org/issues/144 Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* buffer: Add a secure buffer mechanism to avoid memory spillsAris Adamantiadis2014-09-071-0/+1
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* buffer: Implement "t" for text in ssh_buffer_pack().Aris Adamantiadis2014-09-071-2/+3
| | | | Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Fix writing the '\0'.Andreas Schneider2014-08-181-2/+2
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* tests: Use public testkey passphrase function in pki test.Andreas Schneider2014-08-151-7/+6
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* torture: Add public testkey passphrase function.Andreas Schneider2014-08-152-0/+6
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* tests: Use public testkeys in pki test.Andreas Schneider2014-08-151-178/+74
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* torture: Add public testkey functions.Andreas Schneider2014-08-152-0/+218
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* tests: Make write file a public torture function.Andreas Schneider2014-08-153-30/+32
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* tests: Make sure we null terminate the buffer.Andreas Schneider2014-08-151-3/+4
| | | | | | | CID: 1230359 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* tests: Fix memory leak in buffer test.Andreas Schneider2014-08-151-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
* torture_pki: avoid generating keys with ssh-keygenAris Adamantiadis2014-08-061-96/+212
| | | | | | | | ssh-keygen makes the tests very slow because new keys are generated at the start of every test. ssh-keygen on OSX doesn't support ecdsa keys, even if libcrypto does. Reviewed-by: Andreas Schneider <asn@samba.org>
* tests: test the canary feature in buffer_(un)pack()Aris Adamantiadis2014-08-061-1/+27
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>