aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/tests/suites/test_chunk.c
Commit message (Collapse)AuthorAgeFilesLines
* chunk: Add function to calculate Internet Checksums according to RFC 1071Tobias Brunner2014-07-221-0/+49
|
* unit-tests: Use Windows path for chunk tests, and socket functions if requiredMartin Willi2014-06-041-2/+10
|
* unit-tests: Verify two bytes at once when testing chunk_clear()Tobias Brunner2014-04-021-3/+6
| | | | | This reduces the chances of arbitrary test failures if the memory area already got overwritten.
* chunk: Externalize error reporting in chunk_write()Martin Willi2014-01-231-2/+2
| | | | | This avoids passing that arbitrary label just for error messages, and gives greater flexibility in handling errors.
* chunk: Use dynamically allocated buffer in chunk_from_fd()Martin Willi2014-01-231-0/+84
| | | | | | | | When acting on files, we can use fstat() to estimate the buffer size. On non-file FDs, we dynamically increase an allocated buffer. Additionally we slightly change the function signature to properly handle zero-length files and add appropriate unit tests.
* chunk: Add functions to map file contents to a chunkMartin Willi2014-01-231-1/+43
|
* 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.
* unit-tests: Move test suites to its own subfolderMartin Willi2013-11-061-0/+876