summaryrefslogtreecommitdiff
path: root/usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs
diff options
context:
space:
mode:
authorMatt Barden <matt.barden@nexenta.com>2017-09-04 07:25:59 -0500
committerGordon Ross <gwr@nexenta.com>2017-11-30 19:44:43 -0500
commitcd964fce751ca752af4158842063a9579a2d4331 (patch)
tree968b949de63f645bbbd84739221812eb3093530d /usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs
parent6dfcdabd85f09409c5d2f9fb25a3013384ffaf74 (diff)
downloadillumos-joyent-cd964fce751ca752af4158842063a9579a2d4331.tar.gz
5869 Need AES CMAC support in KCF+PKCS11
Portions contributed by: Jason King <jason.king@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Dan McDonald <danmcd@joyent.com> Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs')
-rw-r--r--usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs82
1 files changed, 82 insertions, 0 deletions
diff --git a/usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs b/usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs
new file mode 100644
index 0000000000..d0dc303420
--- /dev/null
+++ b/usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs
@@ -0,0 +1,82 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+#
+
+include $(SRC)/test/Makefile.com
+
+CRYPTO = pkcs kcf
+PROGS = $(CRYPTO:%=$(PROG)_%)
+ROOTOPTPKG = $(ROOT)/opt/crypto-tests
+TESTROOT = $(ROOTOPTPKG)/tests/#$(SUFFIX)/aes
+TESTDIR = $(CRYPTO:%=$(TESTROOT)/%/aes)
+
+COMMONDIR = ../../../common
+OBJS_COMMON = testfuncs.o
+OBJS_COMDIR = $(OBJS_COMMON:%=$(COMMONDIR)/%)
+OBJS_LOCAL = $(PROG:%=%.o)
+OBJS = $(OBJS_LOCAL) $(OBJS_COMDIR)
+OBJS_PKCS = $(OBJS_LOCAL) $(OBJS_COMDIR) $(COMMONDIR)/cryptotest_pkcs.o
+OBJS_KCF = $(OBJS_LOCAL) $(OBJS_COMDIR) $(COMMONDIR)/cryptotest_kcf.o
+SRCS = $(OBJS:%.o=%.c)
+PKCSLIBS = -lpkcs11 -lcryptoutil
+
+C99MODE = -xc99=%all
+
+CMDS = $(TESTDIR:%=%/$(PROG))
+$(CMDS) := FILEMODE = 0555
+
+LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
+LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
+
+CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I$(COMMONDIR) -I$(SRC)/common/crypto/
+
+all: $(PROGS)
+
+$(PROG)_kcf: $(OBJS_KCF)
+ $(LINK.c) $(OBJS_KCF) -o $@ $(LDLIBS)
+ $(POST_PROCESS)
+
+$(PROG)_pkcs: $(OBJS_PKCS)
+ $(LINK.c) $(OBJS_PKCS) -o $@ $(LDLIBS) $(PKCSLIBS)
+ $(POST_PROCESS)
+
+
+$(COMMONDIR)/%.o:
+
+%.o: %.c
+ $(COMPILE.c) -o $@ $<
+
+install: all $(CMDS)
+
+lint: $(CRYPTO:%=lint_%)
+
+lint_pkcs:
+ $(LINT.c) $(OBJS_PKCS:%.o=%.c) $(LDLIBS) $(PKCSLIBS)
+
+lint_kcf:
+ $(LINT.c) $(OBJS_KCF:%.o=%.c) $(LDLIBS)
+clobber: clean
+ -$(RM) $(PROGS)
+
+clean:
+ -$(RM) $(OBJS_LOCAL)
+
+$(CMDS): $(TESTDIR) $(PROGS)
+
+$(TESTDIR):
+ $(INS.dir)
+
+$(TESTROOT)/%/aes/$(PROG): $(PROG)_%
+ $(INS.rename)