Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | enum: Return boolean result for enum_from_name() lookup | Martin Willi | 2014-05-16 | 1 | -21/+30 | |
| | | | | | | | | | | | Handling the result for enum_from_name() is difficult, as checking for negative return values requires a cast if the enum type is unsigned. The new signature clearly differentiates lookup result from lookup value. Further, this actually allows to convert real -1 enum values, which could not be distinguished from "not-found" and the -1 return value. This also fixes several clang warnings where enums are unsigned. | |||||
* | enum: Don't directly include enum.h | Martin Willi | 2014-05-16 | 1 | -1/+0 | |
| | | | | | To allow enum.h to depend on utils.h definitions, avoid its direct inclusion. Instead include utils.h, which includes enum.h as well. | |||||
* | settings: Adopt the new order of sections and settings when replacing configs | Tobias Brunner | 2014-05-15 | 1 | -1/+83 | |
| | ||||||
* | settings: Only purge sections if necessary | Tobias Brunner | 2014-05-15 | 1 | -0/+29 | |
| | | | | | Instead of removing and caching all values of a previous config, we only do this for actually removed sections/settings. | |||||
* | settings: Maintain order of sections and settings while enumerating | Tobias Brunner | 2014-05-15 | 1 | -57/+24 | |
| | ||||||
* | settings: Don't overwrite values in-place | Tobias Brunner | 2014-05-15 | 1 | -7/+16 | |
| | | | | | | | This is not thread safe. If threads are reading from pointers to existing values they could get a partially updated invalid value. Refactored assignment to a separate function. | |||||
* | unit-tests: Update settings tests to match new parser | Tobias Brunner | 2014-05-15 | 1 | -59/+124 | |
| | | | | | Empty settings are now ignored, strings are supported, newlines are handled properly (e.g. at the end of files) etc. | |||||
* | settings: Move to a separate folder | Tobias Brunner | 2014-05-15 | 1 | -1/+1 | |
| | ||||||
* | unit-tests: Document the supported env variables | Martin Willi | 2014-04-30 | 1 | -1/+7 | |
| | ||||||
* | unit-tests: Support strongswan.conf defined plugin list and base directory | Thomas Egerer | 2014-04-30 | 1 | -2/+8 | |
| | | | | | | | tests.load and tests.plugindir to allow the specification of the plugins to be loaded and the directory to load them from. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | |||||
* | unit-tests: Allow configuration of libstrongswan via config | Thomas Egerer | 2014-04-30 | 1 | -10/+14 | |
| | | | | | | | | By setting the environment variable TESTS_STRONGSWAN_CONF, the unit tests can be asked to load a configuration file, thus enabling the tester to make use of the usual configuration settings. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | |||||
* | unit-tests: Add a ck_assert_chunk_eq() convenience macro | Martin Willi | 2014-04-30 | 1 | -0/+18 | |
| | ||||||
* | unit-tests: Silence a literal signedness warning raised by GCC 4.6.3 | Martin Willi | 2014-04-30 | 1 | -2/+2 | |
| | ||||||
* | unit-tests: Verify two bytes at once when testing chunk_clear() | Tobias Brunner | 2014-04-02 | 1 | -3/+6 | |
| | | | | | This reduces the chances of arbitrary test failures if the memory area already got overwritten. | |||||
* | unit-tests: Catch timeouts during test runner deinit function | Martin Willi | 2014-04-01 | 1 | -6/+18 | |
| | | | | | | The test runner deinit function often cancels all threads from the pool. This operation might hang on error conditions, hence we should include that hook in the test timeout to fail properly. | |||||
* | unit-tests: Prevent a failing worker thread to go wild after it fails | Martin Willi | 2014-04-01 | 1 | -1/+2 | |
| | | | | | | A worker raises SIGUSR1 to inform the main thread that the test fails. The main thread then starts cancelling workers, but the offending thread should be terminated immediately to prevent it from test continuation. | |||||
* | unit-tests: Fix filtered enumerator tests on 64-bit big-endian platforms | Tobias Brunner | 2014-03-27 | 1 | -12/+12 | |
| | | | | | In case of sizeof(void*) == 8 and sizeof(int) == 4 on big-endian hosts the tests failed as the actual integer value got cut off. | |||||
* | unit-tests: Fix memory leak in ntru tests | Tobias Brunner | 2014-03-27 | 1 | -3/+5 | |
| | ||||||
* | unit-test: added missing TEST_FUNCTION macros | Andreas Steffen | 2014-03-22 | 1 | -8/+16 | |
| | ||||||
* | Completed integration of ntru_crypto library into ntru plugin | Andreas Steffen | 2014-03-22 | 1 | -4/+62 | |
| | ||||||
* | unit-tests: Add an option to increase the verbosity when running tests | Tobias Brunner | 2014-03-20 | 1 | -1/+9 | |
| | | | | | The TESTS_VERBOSITY option takes an integer from -1 to 4 that sets the default debug level. | |||||
* | unit-tests: Add an option to run only a subset of all test suites | Tobias Brunner | 2014-03-20 | 1 | -8/+54 | |
| | | | | | The TESTS_SUITES environment variable can contain a comma separated list of names of test suites to run. | |||||
* | unit-tests: Actually verify registered algorithms against test vectors | Tobias Brunner | 2014-03-20 | 1 | -4/+9 | |
| | | | | | | | | Previously, the {ns}.crypto_test.on_add option had to be enabled to actually test the algorithms, which we can't enforce for the tests in the test_runner as the option is already read when the crypto factory is initialized. Even so, we wouldn't want to do this for every unit test, which would be the result of enabling that option. | |||||
* | unit-tests: Use TEST_FUNCTION macro in ntru tests | Tobias Brunner | 2014-03-20 | 1 | -34/+44 | |
| | ||||||
* | unit-tests: Call functions with TEST_ prefix in ntru test | Tobias Brunner | 2014-03-20 | 1 | -36/+38 | |
| | ||||||
* | unit-tests: Change how hashtable for testable functions is created | Tobias Brunner | 2014-03-20 | 1 | -9/+13 | |
| | | | | | | | | Because GCC does not adhere to the priorities defined for constructors when building with --enable-monolithic (not sure if it was just luck that it worked in non-monolithic mode - anyway, it's not very portable) function registration would fail because the hashtable would not be created yet. | |||||
* | unit-tests: Generate weak keys with gcrypt plugin (but quickly) | Tobias Brunner | 2014-03-20 | 1 | -0/+3 | |
| | ||||||
* | Implemented ntru_private_key class | Andreas Steffen | 2014-03-18 | 1 | -40/+344 | |
| | ||||||
* | Added get_array() method to ntru_poly_t class | Andreas Steffen | 2014-02-27 | 1 | -1/+33 | |
| | ||||||
* | Defined ntru_poly_create_from_seed() and ntru_poly_create_from_data() ↵ | Andreas Steffen | 2014-02-27 | 1 | -7/+120 | |
| | | | | constructors and built some unit tests for the latter) | |||||
* | Implement ring multiplication method | Andreas Steffen | 2014-02-27 | 1 | -14/+17 | |
| | ||||||
* | utils: Add memrchr(3) replacement for platforms that don't support it | Tobias Brunner | 2014-02-26 | 1 | -0/+44 | |
| | | | | For instance, on Mac OS X memrchr(3) is not provided by the C library. | |||||
* | utils: Add thread-safe variants of dirname(3) and basename(3) | Tobias Brunner | 2014-02-24 | 1 | -0/+56 | |
| | ||||||
* | index limit can be easily computed | Andreas Steffen | 2014-02-19 | 1 | -12/+10 | |
| | ||||||
* | Created ntru_poly class for sparse trinary polynomials | Andreas Steffen | 2014-02-18 | 1 | -6/+120 | |
| | ||||||
* | Fixed some typos | Tobias Brunner | 2014-02-18 | 1 | -2/+2 | |
| | ||||||
* | unit-tests: Ignore tests not test_runner | Tobias Brunner | 2014-02-18 | 1 | -1/+1 | |
| | ||||||
* | settings: Add support to enumerate sections and key/value pairs with fallbacks | Tobias Brunner | 2014-02-12 | 1 | -10/+24 | |
| | ||||||
* | array: Add array_bsearch function | Tobias Brunner | 2014-02-12 | 1 | -0/+66 | |
| | ||||||
* | array: Add array_sort function | Tobias Brunner | 2014-02-12 | 1 | -0/+90 | |
| | ||||||
* | unit-tests: Test how settings_t handles some invalid data | Tobias Brunner | 2014-02-12 | 1 | -0/+72 | |
| | ||||||
* | settings: Add method that allows to define fallback sections for other sections | Tobias Brunner | 2014-02-12 | 1 | -0/+109 | |
| | | | | | The fallbacks are currently only used for single value lookups. Enumerators are not affected by them. | |||||
* | unit-tests: Add tests for includes and file loading in settings_t | Tobias Brunner | 2014-02-12 | 1 | -0/+149 | |
| | ||||||
* | settings: Allow empty strings in section key | Tobias Brunner | 2014-02-12 | 1 | -0/+2 | |
| | ||||||
* | unit-tests: Add tests for enumerators in settings_t | Tobias Brunner | 2014-02-12 | 1 | -0/+148 | |
| | ||||||
* | unit-tests: Add tests for setters in settings_t | Tobias Brunner | 2014-02-12 | 1 | -0/+109 | |
| | ||||||
* | unit-tests: Add basic tests for settings_t | Tobias Brunner | 2014-02-12 | 3 | -0/+319 | |
| | ||||||
* | lib: Add global config namespace | Tobias Brunner | 2014-02-12 | 1 | -2/+2 | |
| | ||||||
* | asn1: Support dates before 1970-01-01 (i.e. when time_t gets negative) | Tobias Brunner | 2014-02-12 | 1 | -0/+6 | |
| | | | | | | On x86 we allow "overflows" around 1969/1970 but not for other dates. Fixes #509. | |||||
* | asn1: Add additional validation for parsed ASN.1 date/time values | Tobias Brunner | 2014-02-12 | 1 | -0/+8 | |
| |