Commit graph

12 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
e276f2b407 Ensure that we always have off_t and ssize_t in scope.
POSIX requires <stdio.h> and <unistd.h> to define off_t and ssize_t like <sys/types.h> does, but not all platforms respect that.  Play it safe by always including <sys/types.h>.
2016-09-15 10:15:00 +02:00
Dag-Erling Smørgrav
401465d8ea Move main() from libcryb-test to the test program.
Instead of having libcryb-test provide main() and assume that the test program defines t_prepare() and t_cleanup(), have libcryb-test provide a t_main() function which the test program calls with pointers to its prepare and cleanup functions.
2016-03-15 14:29:44 +01: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
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
33cb3dad6a Remove <stdio.h> from code that doesn't need it. 2014-08-02 23:23:19 +00:00
Dag-Erling Smørgrav
479ffbba4a Remove author and sponsor tags; we'll deal with that some other way.
Remove $Cryb$ tags as it is likely that the code will move to git.
2014-08-01 14:31:07 +00:00
Dag-Erling Smørgrav
8c9c5f26e4 Take advantage of t_compare_mem(). 2014-07-11 22:26:23 +00:00
Dag-Erling Smørgrav
18650540d8 Avoid hardcoded lengths. This fixes a bug in the HMAC-SHA224 tests. 2014-07-11 15:09:59 +00:00
Dag-Erling Smørgrav
8e786c5a98 Introduce t_zero (a 256-byte array of zeroes) and t_seq8 (a 256-byte array
counting up from zero).  Use them to simplify the HMAC-SHA1 test vectors.
2014-07-11 12:46:23 +00:00
Dag-Erling Smørgrav
b3a718a7ff Oops, use the correct keys 2014-07-11 11:28:01 +00:00
Dag-Erling Smørgrav
0681394b23 Replace the FIPS-198 test vectors with those from the NIST CSRC's
algorithm example page.
2014-07-11 11:21:19 +00:00
Dag-Erling Smørgrav
63bcbcca20 Rename the HMAC-SHA1 code. 2014-07-10 23:57:47 +00:00
Renamed from t/t_hmac.c (Browse further)