svn commit: r345028 - stable/11/tools/tools/crypto
John Baldwin
jhb at FreeBSD.org
Mon Mar 11 21:38:00 UTC 2019
Author: jhb
Date: Mon Mar 11 21:37:58 2019
New Revision: 345028
URL: https://svnweb.freebsd.org/changeset/base/345028
Log:
MFC 331417,331597: Add the cryptocheck test tool.
331417:
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.
331597:
Update the license to note my work on cryptocheck was sponsored.
Sponsored by: Chelsio Communications
Added:
stable/11/tools/tools/crypto/cryptocheck.c
- copied, changed from r331417, head/tools/tools/crypto/cryptocheck.c
Modified:
stable/11/tools/tools/crypto/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/tools/tools/crypto/Makefile
==============================================================================
--- stable/11/tools/tools/crypto/Makefile Mon Mar 11 21:35:56 2019 (r345027)
+++ stable/11/tools/tools/crypto/Makefile Mon Mar 11 21:37:58 2019 (r345028)
@@ -1,5 +1,6 @@
# $FreeBSD$
#
+# Copyright (c) 2018 Conrad Meyer <cem at 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>
Copied and modified: stable/11/tools/tools/crypto/cryptocheck.c (from r331417, head/tools/tools/crypto/cryptocheck.c)
==============================================================================
--- head/tools/tools/crypto/cryptocheck.c Fri Mar 23 04:31:19 2018 (r331417, copy source)
+++ stable/11/tools/tools/crypto/cryptocheck.c Mon Mar 11 21:37:58 2019 (r345028)
@@ -1,5 +1,30 @@
/*-
- * Copyright (c) 2017 John Baldwin, <jhb at FreeBSD.org>
+ * Copyright (c) 2017 Chelsio Communications, Inc.
+ * All rights reserved.
+ * Written by: John Baldwin <jhb at FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*-
* Copyright (c) 2004 Sam Leffler, Errno Consulting
* All rights reserved.
*
More information about the svn-src-stable
mailing list