aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2019-12-20unittests: Adds unitests for ecdsa and rsa with PKCS11 URIs.Sahana Prasad1-0/+8
Signed-off-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-06-12token, kex: Add functions to handle tokens listsAnderson Toshiyuki Sasaki1-0/+1
The added functions allow splitting chains of tokens separated by a given character (usually ','), and extracting matching parts between two chains of tokens. The previously existing functions in kex.c were replaced by the introduced ones. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-04-01tests: Add tests for server side configurationAnderson Toshiyuki Sasaki1-2/+8
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-03-07Add unit test for fn that generates session keysSimo Sorce1-0/+1
Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-02-07Allow building without Group Exchange supportJakub Jelen1-1/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-24tests: Added moduli file parsing testsAris Adamantiadis1-0/+7
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-11-28tests: Introduce functions to change directoriesAnderson Toshiyuki Sasaki1-0/+1
This introduces torture_get_current_working_dir() and torture_change_dir() to allow changing directories in tests. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-11-28tests: Introduce torture_create_temp_file()Anderson Toshiyuki Sasaki1-0/+1
Introduced torture_create_temp_file() and torture_close_fp() to allow creating temprary files transparently in Unix and Windows environment. This also adds a unit test for the added functions. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-11-28tests: Introduce torture_make_temp_dir()Anderson Toshiyuki Sasaki1-0/+1
Introduces a function to create temporary dir for testing purposes. Also adds a minimal test for the temporary directory creation. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-16CVE-2018-10933: Add tests for packet filteringAnderson Toshiyuki Sasaki1-0/+1
Created the test torture_packet_filter.c which tests if packets are being correctly filtered. Fixes T101 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-05include: Add macros for bytearray handlingAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-09-26cmake: Rewritten AddCMockaTest.cmakeAnderson Toshiyuki Sasaki1-83/+69
This changes add_cmocka_test() to receive compiler options, the libraries to be linked to the test, and the linker options. The way the tests are declared in tests/unittests and tests/client were updated. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05tests: Fix linking unit testsAndreas Schneider1-25/+25
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29tests: Add torture_hashes for pubkey hashesJan-Niklas Burfeind1-0/+2
Signed-off-by: Jan-Niklas Burfeind <libssh@aiyionpri.me> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-20cmake: Improve compiler flag detectionAndreas Schneider1-0/+38
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03tests: Run thread tests on WindowsAnderson Toshiyuki Sasaki1-8/+12
When pthreads is available, run the threads tests on Windows Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03tests: Add test for RSA PKI running on threadsAnderson Toshiyuki Sasaki1-0/+2
Run the tests from torture_pki_rsa.c on threads. Tests requiring files to be removed are not tested, since they would require the access to the files to be synchronized. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03tests: Add test for crypto running on threadsAnderson Toshiyuki Sasaki1-0/+2
The test run crypto test on multiple threads. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03tests: Add test for buffer running on threadsAnderson Toshiyuki Sasaki1-0/+3
The test run buffer tests on multiple threads. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03tests: Add test for init running on threadsAnderson Toshiyuki Sasaki1-0/+2
The test runs ssh_init()/ssh_finalize() on multiple threads. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03threads: Automatically call ssh_init on loadAnderson Toshiyuki Sasaki1-2/+3
This makes unnecessary to call ssh_init() when the library is dynamically loaded. Also removes the threads shared library. The used threads implementation is chosen in configuration time, changing the ssh_threads_get_default() depending on the available threads library. Internally, it is expected a threads implementation providing: - void ssh_mutex_lock(void **mutex); - void ssh_mutex_unlock(void **mutex); - struct ssh_threads_callbacks_struct *ssh_threads_get_default(void); and a crypto implementation providing: - int crypto_thread_init(struct ssh_threads_callbacks_struct *user_callbacks); - void crypto_thread_finalize(void); This adds internal threads implementation for pthreads and noop. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-29cmake: Disable torture_packet on WindowsAndreas Schneider1-1/+3
The test uses socketpair(). Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-28tests: packet encryption unit testingAris Adamantiadis1-0/+1
That code is really ugly, but it wasn't meant to be modular at all in the first place. Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-06-04knownhosts: Introduce new known hosts managing functionsAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10cmake: Move ed25519 tests into unix partAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10tests: Move rsa tests to own test fileAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10tests: Move ecdsa tests to own test fileAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-01-10tests: Move dsa tests to own test fileAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-08-24tests: added unit test on including config filesNikos Mavrogiannopoulos1-0/+1
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com> Reviewed-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>
2015-09-23tests: add test for cipher.(de|en)cryptAris Adamantiadis1-0/+1
2015-09-07cmake: Handle libssh threas library correctlyAndreas Schneider1-5/+7
This should fix the build on Windows and would not install pkg files. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05cmake: Add missing OpenSSL include directoryAndreas Schneider1-0/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02ed25519: Add test for signatures and verificationAris Adamantiadis1-0/+1
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20tests: Add torture_server_x11 test.Alan Dunn1-0/+3
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>
2013-10-31tests: Add a test for ssh_channel().Andreas Schneider1-0/+2
2012-10-07test: Use cmocka instead of cmockery.Andreas Schneider1-10/+10
cmocka is the successor of cmockery. http://git.cryptomilk.org/projects/cmocka.git/
2011-04-14Added some tortures for pkimilo1-0/+1
2011-02-12Connect: Test the new isipaddr() functionAris Adamantiadis1-0/+1
2011-01-01tests: Don't run torture_keyfiles on Windows.Andreas Schneider1-1/+3
This test needs ssh-keygen to be working.
2010-12-29cmake: Don't build torture_rand on Windows.Andreas Schneider1-1/+3
2010-12-28tests: Migrated torture_rand to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Migrated torture_options to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Migrated torture_misc to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Migrated torture_list to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Moved torture_knownhosts to client tests.Andreas Schneider1-1/+0
2010-12-28tests: Migrated torture_keyfiles to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Migrated torture_init to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Migrated torture_callbacks to cmockery.Andreas Schneider1-1/+1
2010-12-28tests: Migrate torture_buffer to cmockery.Andreas Schneider1-1/+1