diff --git a/Makefile.am.in b/Makefile.am.in index 7931f0b24b14e675a3e202e4024c99746a691b6e..1351751d17048610df61e6dc0dfaf8a04fd3f537 100644 --- a/Makefile.am.in +++ b/Makefile.am.in @@ -5,12 +5,13 @@ BODY: AUTOMAKE_OPTIONS = foreign noinst_LIBRARIES = libsymmetric.a -noinst_PROGRAMS = desTest desdata +noinst_PROGRAMS = desTest desdata bf_test # When compiling with lsh, this is set to to -DLSH -I/path/to/lsh/include # INCLUDES = @crypto_cpp_flags@ -desTest_LDADD = libsymmetric.a +LDADD = libsymmetric.a +desdata_LDADD = des_headers = parity.h rotors.h keymap.h BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \ @@ -18,7 +19,7 @@ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \ libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \ $(BUILT_SOURCES) \ - sha.c md5.c idea.c rc4.c cast.c blowfish.c util.c + sha.c md5.c idea.c rc4.c cast.c blowfish.c # Generate DES headers. $(des_headers): desdata diff --git a/bf_test.c b/bf_test.c new file mode 100644 index 0000000000000000000000000000000000000000..74ce624381fe39cd9da2f89a6232a0f414a61753 --- /dev/null +++ b/bf_test.c @@ -0,0 +1,24 @@ +/* bf_test.c + * + * $Id$ + * Test the blow fish implementation. */ + +#include "blowfish.h" + +#include <stdio.h> +#include <stdlib.h> + +int main (int argc, char **argv) +{ + if (bf_selftest()) + { + fprintf(stderr, "Blowfish works.\n"); + exit(EXIT_SUCCESS); + } + else + { + fprintf(stderr, "ERROR: Blowfish failed.\n"); + exit(EXIT_FAILURE); + } +} +