aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/tests/suites/test_chunk.c
Commit message (Collapse)AuthorAgeFilesLines
* chunk: Skip all leading zero bytes in chunk_skip_zero() not just the firstTobias Brunner2016-04-041-12/+16
|
* Use standard unsigned integer typesAndreas Steffen2016-03-241-5/+5
|
* Fixed some typos, courtesy of codespellTobias Brunner2015-08-271-1/+1
|
* utils: Add a constant time chunk_equals() variant for cryptographic purposesMartin Willi2015-04-141-0/+27
|
* unit-tests: Fix internet checksum tests on big-endian systemsTobias Brunner2014-10-231-4/+9
| | | | | | | We actually need to do a byte-swap, which ntohs() only does on little-endian systems. Fixes #747.
* 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