Bring in JHB's cryptocheck tool

It can be used to validate basic algorithm correctness on a variety of inputs,
by comarison to openssl.

While here, add some sanity to the crypto/Makefile.

The tool may not be perfect, but getting it in tree where collaboration can
happen is a nice first step.  The pace of development outside of svn seems
to have slowed down mid-2017.

Obtained from:	github bsdjhb/freebsd:cryptocheck
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2018-03-23 04:31:19 +00:00
parent 88ccfa7497
commit f634b92384
2 changed files with 1183 additions and 31 deletions

View File

@ -1,5 +1,6 @@
# $FreeBSD$
#
# Copyright (c) 2018 Conrad Meyer <cem@FreeBSD.org>
# Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
# All rights reserved.
#
@ -25,40 +26,23 @@
# SUCH DAMAGE.
#
ALL= cryptotest cryptokeytest cryptostats \
PROGS= cryptocheck cryptotest cryptokeytest cryptostats \
ubsecstats hifnstats ipsecstats safestats
BINDIR= /usr/local/bin
MAN=
BINDIR?= /usr/local/bin
all: ${ALL}
# cryptocheck: test symmetric crypto functions
LIBADD.cryptocheck+= crypto ssl util
# program to test asymmetric crypto functions
cryptokeytest: cryptokeytest.c
${CC} -o cryptokeytest cryptokeytest.c -lcrypto
# cryptokeytest: test asymmetric crypto functions
LIBADD.cryptokeytest+= crypto
# program to dump statistics kept by the core crypto code
cryptostats: cryptostats.c
${CC} -o cryptostats cryptostats.c
# cryptostats: dump statistics kept by the core crypto code
# ubsecstats: print statistics kept by the Broadcom driver
# hifnstats: print statistics kept by the HIFN driver
# safestats: statistics kept by the SafeNet driver
# ipsecstats: print statistics kept by fast ipsec
# program to print statistics kept by the Broadcom driver
ubsecstats: ubsecstats.c
${CC} -o ubsecstats ubsecstats.c
CLEANFILES+= core a.out
# program to print statistics kept by the HIFN driver
hifnstats: hifnstats.c
${CC} -o hifnstats hifnstats.c
# program to print statistics kept by the SafeNet driver
safestats: safestats.c
${CC} -o safestats safestats.c
# program to print statistics kept by fast ipsec
ipsecstats: ipsecstats.c
${CC} -o ipsecstats ipsecstats.c
clean:
rm -f ${ALL} core a.out
install: ${ALL}
for i in ${ALL}; do \
install $$i ${DESTDIR}${BINDIR}; \
done
.include <bsd.progs.mk>

File diff suppressed because it is too large Load Diff