Dag-Erling Smørgrav
0995671d43
Don't rely on side effects between sequence points
2015-12-14 17:49:49 +01:00
Dag-Erling Smørgrav
f04b77e2a5
typo
2015-12-14 16:05:18 +01:00
Dag-Erling Smørgrav
4d7893004c
Prepare for moving to Github
2015-12-14 15:55:38 +01:00
Dag-Erling Smørgrav
d69c5dcdf8
Correct copyright ranges
2015-12-14 15:55:04 +01:00
Dag-Erling Smørgrav
5584b68908
Fix t_malloc_snapshot(): stash the difference between nalloc and nfree,
...
not the numbers themselves.
In t_malloc_printstats(), show information about mapped allocations.
In t_malloc_leaked(), check for leaked mapped allocations. Note that
they would show up anyway since the metadata are allocated from the
bucket allocator, but this makes them more visible.
2015-11-02 19:45:12 +00:00
Dag-Erling Smørgrav
7b48030ada
Revert accidental commit
2015-11-02 19:34:54 +00:00
Dag-Erling Smørgrav
955cbc3013
Add t_malloc_snapshot() which writes a snapshot of the allocator state to
...
a caller-provided buffer. Use it to warn about leaks in each individual
test case. Note that we can't fail a test case for leaking, because
individual test cases in a unit may modify shared state which is cleaned
up at the end of the series.
2015-11-02 19:34:03 +00:00
Dag-Erling Smørgrav
3e88a08c10
Clean up a bit and add more test cases, including comprehensive tests for
...
string_append_{cs,string}().
2015-10-13 21:44:37 +00:00
Dag-Erling Smørgrav
fd515ccd79
Clear up confusion between lengths and sizes.
...
Fix a harmless bug in string_shrink().
2015-10-13 21:42:57 +00:00
Dag-Erling Smørgrav
0a9f2c21fe
When running a test, make sure it didn't leave allocation failure enabled.
...
Add predicates for null and non-null pointers.
Staticize some internal allocator state.
2015-10-13 21:39:47 +00:00
Dag-Erling Smørgrav
4fa82f7c7b
Simplify existing tests:
...
- Set t_malloc_fatal so we don't have to check for allocation failures
(the driver will catch the SIGABRT).
- Use string_dup_cs() instead of string_new() + string_append_cs().
2015-10-13 20:22:07 +00:00
Dag-Erling Smørgrav
454603d4f1
Add <unistd.h> to more files. FreeBSD's namespace pollution hides these
...
errors.
2015-10-12 11:45:26 +00:00
Dag-Erling Smørgrav
2acf532339
libtest is not just for internal use.
2015-10-12 11:41:47 +00:00
Dag-Erling Smørgrav
e6049c1d6a
Add string_len() (return length of string) and string_dup_cs() (create a
...
string from a null-terminated string). Add test for string_trunc().
2015-10-12 10:23:24 +00:00
Dag-Erling Smørgrav
eb61dac230
<unistd.h> required for t_compare_ssz()
2015-10-12 10:20:14 +00:00
Dag-Erling Smørgrav
f67b3cf5da
Add missing prototype for t_compare_ssz()
2015-10-12 10:19:53 +00:00
Dag-Erling Smørgrav
b5d5f111ca
Add missing Makefile
2015-10-04 07:51:08 +00:00
Dag-Erling Smørgrav
f8ebdbc14d
Move the test framework into its own subdirectory
2015-10-04 07:49:48 +00:00
Dag-Erling Smørgrav
ab8f712584
Correctly register AES192 and AES256
2015-10-04 07:19:52 +00:00
Dag-Erling Smørgrav
aa4a92bac9
Fix cipher macros
2015-10-04 07:19:28 +00:00
Dag-Erling Smørgrav
cf02f33af7
Implement the full range of test vectors from RFC 6229.
2015-10-04 07:08:36 +00:00
Dag-Erling Smørgrav
476c9f27f7
Use our own endianness conversion macros.
2015-10-04 07:07:53 +00:00
Dag-Erling Smørgrav
03bd9ea902
Code cleanup
2015-10-03 15:33:47 +00:00
Dag-Erling Smørgrav
ed9403627f
Add more AES test vectors
2015-10-03 15:13:17 +00:00
Dag-Erling Smørgrav
dd466ab29b
Move some code around
2015-10-03 14:47:59 +00:00
Dag-Erling Smørgrav
023ec74be2
Implement cipher algorithm list and rename some files.
2015-10-03 14:44:59 +00:00
Dag-Erling Smørgrav
a9e733f0ca
Use an enum for encrypt / decrypt + minor cleanup
2015-10-03 14:43:33 +00:00
Dag-Erling Smørgrav
1826bb12bf
Modify the coverage build script so that it only runs "make clean" if
...
coverage was not already enabled when the script was started.
2015-10-03 14:30:24 +00:00
Dag-Erling Smørgrav
dd18cd2995
Kick off libcryb-cipher with AES (from XySSL) and RC4 (my own).
2015-10-03 14:24:59 +00:00
Dag-Erling Smørgrav
94471e9923
Always clear the negative flag in mpi_zero()
2015-10-03 14:23:32 +00:00
Dag-Erling Smørgrav
9042130830
Fix ossifrage underflow error in Adler32 unit test
2015-10-03 14:20:07 +00:00
Dag-Erling Smørgrav
bf36ff7a8c
Correct context length for SHA digests
2015-10-03 13:56:07 +00:00
Dag-Erling Smørgrav
398abda6b0
Fix various bugs relating to digest algorithm registration and wrapping
2015-10-03 09:32:44 +00:00
Dag-Erling Smørgrav
8d087eeb64
Fix endian.h includes
2015-10-03 09:31:57 +00:00
Dag-Erling Smørgrav
f99073058c
Whitespace cleanup to reduce diffs between SHA-512 and SHA-384.
2015-09-15 10:09:09 +00:00
Dag-Erling Smørgrav
17ccbb2f76
rm leftover code from a copypasto
2015-08-28 10:44:30 +00:00
Dag-Erling Smørgrav
0961e4b2e0
Rewrite unit tests for the Fletcher and Adler checksums to exercise
...
boundary conditions (low and high word overflow).
2015-08-28 08:38:49 +00:00
Dag-Erling Smørgrav
8351719b84
Simplify test cases by a) using C99 VLAs and b) removing error checks for
...
allocation failures which are either harmless (e.g. failing to allocate
the test description string) or will trigger a segfault which the driver
now catches, allowing subequent test cases to run.
2015-08-19 11:27:48 +00:00
Dag-Erling Smørgrav
cbc2cd1112
If a test case triggers one of a list of signals (including SIGABRT and
...
SIGSEGV), eat it and fail the test. Also print a summary in verbose mode.
2015-08-19 11:17:06 +00:00
Dag-Erling Smørgrav
5e1e20c624
Add marginally useful test cases based on t_zero.
2015-08-18 15:21:02 +00:00
Dag-Erling Smørgrav
d670e3e94d
Increase the sizeo of t_zero to 4096 bytes.
2015-08-18 15:14:11 +00:00
Dag-Erling Smørgrav
531eeec36b
Add a simple implementation of the Adler-32 checksum.
2015-08-18 13:27:06 +00:00
Dag-Erling Smørgrav
1609b4e08a
Cite the Fletcher paper.
2015-08-18 10:42:41 +00:00
Dag-Erling Smørgrav
20cd7d6012
Add 16-bit endian conversion functions.
2015-08-17 15:37:07 +00:00
Dag-Erling Smørgrav
e4c5e8a9dd
Fix props
2015-08-17 15:24:50 +00:00
Dag-Erling Smørgrav
aa97da3335
Add simple implementations of Fletcher's checksum.
2015-08-17 15:21:47 +00:00
Dag-Erling Smørgrav
9103fab696
Add missing header
2015-04-08 12:17:51 +00:00
Dag-Erling Smørgrav
0d730bd66b
Don't forget to distribute and install <cryb/memset_s.h>
2015-02-16 11:07:43 +00:00
Dag-Erling Smørgrav
110ad04333
If no SVN version is available, use today's date.
...
Place the temporary directory in ${builddir} rather than /tmp.
2015-02-15 09:19:25 +00:00
Dag-Erling Smørgrav
dc75f2edd8
Add a memset_s() implementation (cf. C11 / WG14 N1381)
2015-02-15 09:18:18 +00:00