aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
Commit message (Collapse)AuthorAgeFilesLines
...
* stream: Make sure no watcher callback is active while changing stream callbacksMartin Willi2014-01-221-14/+3
| | | | | | | | | | | When changing async callbacks on streams, we have to make sure the watcher callback is not currently active and has temporarily disabled callbacks. This could have been the case, as we didn't explicitly removed any pending watcher registration if both callbacks are NULL. By enforcing the watcher unregistration, we are sure the watcher callback is not active and currently is not mangling the callback hooks. This should make sure we avoid any races for the callback variables.
* proposal: Add possibility to register custom proposal keyword parserThomas Egerer2014-01-202-2/+66
| | | | | | | | | If a proposal string cannot be matched to a token using strcmp (e.g. if you want to register a whole class of algorithms containing their ID, like my_alg_2342), you can use the provided function to register a parser that transforms the given string into a proposal token. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* unit-tests: Add environment variable to reduce the number of generated keysTobias Brunner2014-01-202-2/+14
| | | | | | | If TESTS_REDUCED_KEYLENGTHS is set RSA and ECDSA keys are only generated for the lowest configured key length. Fixes #474.
* unit-tests: Generate RSA key with 768 bits not 786Tobias Brunner2014-01-201-1/+1
|
* printf-hook-builtin: Correctly calculate written bytes in print_in_hook()Martin Willi2014-01-151-3/+7
| | | | | | | | | | The hook data counts remaining buffer bytes, not used ones. Counting them correctly fixes a crash for long hexdumps. Further, print_in_hook() must return the number of bytes that would have been written, not the actually written bytes. This is important, as we allocate a dynamic buffer in bus that relies on the exact byte count. Fixes long hexdumps that got truncated.
* test-asn1: Fix skipping of >2038 tests on i386Tobias Brunner2014-01-061-35/+35
| | | | | | | | 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.
* chunk: Fix chunk_mac/hash tests on big-endian systemsTobias Brunner2014-01-061-2/+27
| | | | | | | | 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.
* utils: Fix %T printf hook on big-endian systemsTobias Brunner2014-01-061-1/+1
| | | | | | | | The cast to a bool* cut of the actual value on big-endian systems if bool was shorter than int because the bool argument to printf gets promoted to an int. Fixes #479.
* tun-device: Include system headers before our ownTobias Brunner2013-12-202-3/+5
| | | | | | | | | | | | | On CentOS 6.5 the sys/capability.h header file defines _LINUX_TYPES_H without actually including that header, preventing its later inclusion here. As library.h (via which the capabilities headers are included) is not actually required in tun_device.[ch], moving the inclusion of tun_device.h would not strictly be necessary. But it's probably a good idea to include our own headers after system headers anyway, for if one of the recursively included files at a later point includes library.h we'd have the same problem again.
* unit-tests: NTRU test to check a special branchAndreas Steffen2013-12-081-0/+7
|
* min_MGF_hash_calls parameter is not needed anymoreAndreas Steffen2013-12-072-18/+0
|
* Optimized MGF1 implementationAndreas Steffen2013-12-071-8/+13
|
* Implemented ntru_trits classAndreas Steffen2013-12-079-293/+383
|
* Streamlined DRBG and MGF1 debug outputAndreas Steffen2013-12-073-14/+20
|
* unit-tests: Added crypter testsAndreas Steffen2013-12-064-3/+112
|
* Added own MGF1 mask generating functionAndreas Steffen2013-12-0511-436/+707
|
* unit-tests: Added hasher testsAndreas Steffen2013-12-043-0/+191
|
* Moved test_rng to a test suite of its ownAndreas Steffen2013-12-044-26/+58
|
* unit-tests: Don't use priority for destructor that unregisters testable ↵Tobias Brunner2013-12-041-1/+6
| | | | | | | | | functions This fixes coverage reports, at least if leak detective is disabled. If it is enabled the plugins are not unloaded so the destructor is not executed until the process is destroyed, which seems not to be covered by gcov.
* unit-tests: Export ntru_drbg_create as testable function so no linking is ↵Tobias Brunner2013-12-043-6/+11
| | | | | | | | 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.
* unit-tests: Add facility to register testable functionsTobias Brunner2013-12-045-3/+169
| | | | | These can be defined in plugins, or other parts of the tested libraries. They can even be static.
* unit-tests: Move ntru_test_rng_t to a utility class in libtestTobias Brunner2013-12-046-48/+37
|
* unit-tests: Fix apidoc for libtestTobias Brunner2013-12-042-8/+23
|
* ntru: Fix compiler warning caused by ++/-- on righthand side of an assignmentTobias Brunner2013-12-041-4/+4
| | | | The behavior of stuff like x = --x; (or x++) is not defined.
* Added DRBG automatic reseeding testsAndreas Steffen2013-11-272-170/+216
|
* Use strongSwan hash plugins for SHA-1 and SHA-256Andreas Steffen2013-11-2720-2764/+178
|
* Extended NIST SP 800-90A HMAC_DRBG test casesAndreas Steffen2013-11-271-21/+103
|
* Cleaned up ntru-crypto libraryAndreas Steffen2013-11-2711-474/+8
|
* Implemented NIST SP 800-90A DRBG_HMAC with SHA-256Andreas Steffen2013-11-2716-1541/+697
|
* unit-tests: Added ntru wrong ciphertext testAndreas Steffen2013-11-272-0/+37
|
* unit-tests: Added ntru entropy, retransmission and ciphertext testsAndreas Steffen2013-11-273-0/+69
|
* Any of the four NTRU parameter sets can be selectedAndreas Steffen2013-11-273-55/+130
|
* Make the NTRU parameter set configurableAndreas Steffen2013-11-272-40/+110
|
* unit-tests: first NTRU test caseAndreas Steffen2013-11-274-2/+95
|
* Prototype implementation of IKE key exchange via NTRU encryptionAndreas Steffen2013-11-2740-3/+9380
|
* chunk: Fix signedness warnings caused by chunk_from_* macrosTobias Brunner2013-11-271-3/+3
| | | | | | There are countless other such warnings because e.g. chunk_create() is called with char*, but at least we prevent users from causing such warnings inadvertently when using these macros.
* tun-device: Include <linux/types.h> before <linux/if_tun.h>Martin Willi2013-11-221-0/+1
| | | | Fixes a build error on CentOS 6.4.
* printf-hook-builtin: Don't use %P to print uppercase hex pointersMartin Willi2013-11-201-6/+0
| | | | We use %P as custom printf specifier for proposals.
* openssl: Verify that a peer's ECDH public value is a point on the elliptic curveTobias Brunner2013-11-191-0/+5
| | | | | This check is mandated by RFC 6989. Since we don't reuse DH secrets, it is mostly a sanity check.
* Implemented libstrongswan.plugins.random.strong_equals_true optionAndreas Steffen2013-11-163-0/+22
|
* android: Remove dependency on libvstrTobias Brunner2013-11-131-5/+2
|
* unit-tests: Initialize tests with a callbackTobias Brunner2013-11-063-56/+58
|
* plugin-loader: Convenience function added to add plugin dirs in build treeTobias Brunner2013-11-062-0/+28
|
* unit-tests: Separate test runner to a library, reusable by other testsMartin Willi2013-11-065-68/+168
| | | | | | 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.
* unit-tests: Use some include magic to define test suite constructorsMartin Willi2013-11-062-73/+55
| | | | | Avoid editing of several files when creating test suites by using a single header file to define test suite constructor functions.
* unit-tests: Check printing of strings having zero lengthMartin Willi2013-11-061-0/+2
|
* unit-tests: Add some basic tests if PRI* printf specifiers work as expectedMartin Willi2013-11-061-0/+25
|
* unit-tests: Add a semaphore wait cancel testMartin Willi2013-11-061-0/+44
|
* unit-tests: Add a semaphore absolute timed wait testMartin Willi2013-11-061-0/+27
|
* unit-tests: Add a semaphore timed wait test caseMartin Willi2013-11-061-0/+24
|