Martin Willi
589fab2260
array: Add an array_get() function
2014-01-22 15:34:53 +01:00
Tobias Brunner
303ec3956c
unit-tests: Add environment variable to reduce the number of generated keys
...
If TESTS_REDUCED_KEYLENGTHS is set RSA and ECDSA keys are only generated
for the lowest configured key length.
Fixes #474 .
2014-01-20 15:40:15 +01:00
Tobias Brunner
3d097e1024
unit-tests: Generate RSA key with 768 bits not 786
2014-01-20 15:40:09 +01:00
Tobias Brunner
94e10f15e5
test-asn1: Fix skipping of >2038 tests on i386
...
The two constants overflow time_t on i386 (they also produced a compiler
warning without type suffix) so the comparison with TIME_32_BIT_SIGNED_MAX
did not work as intended.
Fixes #477 .
2014-01-06 18:23:40 +01:00
Tobias Brunner
d62a6ec3f9
chunk: Fix chunk_mac/hash tests on big-endian systems
...
Our SipHash-2-4 implementation returns the result in host order, while
the test vectors are little-endian. Use a custom comparison function to
account for this.
Fixes #478 .
2014-01-06 17:31:07 +01:00
Andreas Steffen
953a922e9b
unit-tests: NTRU test to check a special branch
2013-12-08 10:18:33 +01:00
Andreas Steffen
abd4797dc1
Implemented ntru_trits class
2013-12-07 23:27:59 +01:00
Andreas Steffen
933f3c6e8f
unit-tests: Added crypter tests
2013-12-06 10:09:36 +01:00
Andreas Steffen
fdc6c682b2
Added own MGF1 mask generating function
2013-12-05 22:55:47 +01:00
Andreas Steffen
78affed0a0
unit-tests: Added hasher tests
2013-12-04 23:09:32 +01:00
Andreas Steffen
2006709ec5
Moved test_rng to a test suite of its own
2013-12-04 21:23:30 +01:00
Tobias Brunner
d5a0abfa92
unit-tests: Export ntru_drbg_create as testable function so no linking is required
...
This way the plugin does not have to be linked explicitly to the test
runner, which otherwise would require that the plugin is either always
enabled to build the tests or that ifdefs are added to the Makefile.
2013-12-04 20:32:59 +01:00
Tobias Brunner
4cea186b64
unit-tests: Add facility to register testable functions
...
These can be defined in plugins, or other parts of the tested libraries.
They can even be static.
2013-12-04 20:32:59 +01:00
Tobias Brunner
a24eec4649
unit-tests: Move ntru_test_rng_t to a utility class in libtest
2013-12-04 20:32:59 +01:00
Tobias Brunner
6354466a5b
unit-tests: Fix apidoc for libtest
2013-12-04 20:32:59 +01:00
Andreas Steffen
7d5b9e81a4
Added DRBG automatic reseeding tests
2013-11-27 20:21:41 +01:00
Andreas Steffen
d993a567b7
Extended NIST SP 800-90A HMAC_DRBG test cases
2013-11-27 20:21:41 +01:00
Andreas Steffen
98c6421674
Implemented NIST SP 800-90A DRBG_HMAC with SHA-256
2013-11-27 20:21:41 +01:00
Andreas Steffen
9013973cc8
unit-tests: Added ntru wrong ciphertext test
2013-11-27 20:21:41 +01:00
Andreas Steffen
885e699b58
unit-tests: Added ntru entropy, retransmission and ciphertext tests
2013-11-27 20:21:41 +01:00
Andreas Steffen
802eaf3789
Any of the four NTRU parameter sets can be selected
2013-11-27 20:21:41 +01:00
Andreas Steffen
1f73969eb5
Make the NTRU parameter set configurable
2013-11-27 20:21:41 +01:00
Andreas Steffen
2c620cb089
unit-tests: first NTRU test case
2013-11-27 20:21:40 +01:00
Tobias Brunner
334f44cd29
unit-tests: Initialize tests with a callback
2013-11-06 10:31:07 +01:00
Martin Willi
09d0c9030a
unit-tests: Separate test runner to a library, reusable by other tests
...
Other users may make use of the noinst libtest.la helper library to implement
unit tests. For libstrongswan, tests.[ch] provide the configuration for test
runner to perform unit tests in a simple manner.
2013-11-06 10:31:07 +01:00
Martin Willi
5a3230a250
unit-tests: Use some include magic to define test suite constructors
...
Avoid editing of several files when creating test suites by using a single
header file to define test suite constructor functions.
2013-11-06 10:31:07 +01:00
Martin Willi
d9d0eef92b
unit-tests: Check printing of strings having zero length
2013-11-06 10:31:07 +01:00
Martin Willi
61934203e2
unit-tests: Add some basic tests if PRI* printf specifiers work as expected
2013-11-06 10:31:06 +01:00
Martin Willi
a4cbda35ce
unit-tests: Add a semaphore wait cancel test
2013-11-06 10:31:06 +01:00
Martin Willi
fae1b85223
unit-tests: Add a semaphore absolute timed wait test
2013-11-06 10:31:06 +01:00
Martin Willi
a14935ea4b
unit-tests: Add a semaphore timed wait test case
2013-11-06 10:31:06 +01:00
Martin Willi
ffab2e0c95
unit-tests: Add a simple semaphore test
2013-11-06 10:31:06 +01:00
Martin Willi
b1bfe59560
unit-tests: Add a spinlock test case
2013-11-06 10:31:06 +01:00
Martin Willi
478dc0257c
unit-tests: Add a rwlock condvar thread cancel test
2013-11-06 10:31:05 +01:00
Martin Willi
b92c173b28
unit-tests: Add a rwlock condvar absolute timed wait test
2013-11-06 10:31:05 +01:00
Martin Willi
af19213c54
unit-tests: Add a rwlock condvar wait test
2013-11-06 10:31:05 +01:00
Martin Willi
1032f52d68
unit-tests: Add a rwlock condvar broadcast test
2013-11-06 10:31:05 +01:00
Martin Willi
f644b9e853
unit-tests: Add a rwlock condvar test
2013-11-06 10:31:05 +01:00
Martin Willi
dac31fe1a0
unit-tests: Add a rwlock test case
2013-11-06 10:31:05 +01:00
Martin Willi
8b25b5c36f
unit-tests: Add a condvar test where wait gets cancelled
2013-11-06 10:31:04 +01:00
Martin Willi
b7db393d01
unit-tests: Add a condvar test working on a recursive mutex
2013-11-06 10:31:04 +01:00
Martin Willi
8699a32b74
unit-tests: Add a condvar absolute timed wait test
2013-11-06 10:31:04 +01:00
Martin Willi
31f9f777b3
unit-tests: Add a condvar timed wait test
2013-11-06 10:31:04 +01:00
Martin Willi
9a0a891e6b
unit-tests: Add condvar broadcast test
2013-11-06 10:31:04 +01:00
Martin Willi
13183a74d4
unit-tests: Add a simple condvar test
2013-11-06 10:31:04 +01:00
Martin Willi
21df985148
unit-tests: Add a thread local storage cleanup test
2013-11-06 10:31:03 +01:00
Martin Willi
0b00e63e49
unit-tests: Add a thread local storage fuzzer test
2013-11-06 10:31:03 +01:00
Martin Willi
fd26b7ff1b
unit-tests: Add a thread cleanup pop test
2013-11-06 10:31:03 +01:00
Martin Willi
4aec0c5543
unit-tests: Add cleanup test cases for different thread exit situations
2013-11-06 10:31:03 +01:00
Martin Willi
e5b34086f1
unit-tests: Add a test for thread_cancellation_point()
2013-11-06 10:31:03 +01:00