1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
# cavp Makefile, for libreswan
#
# Copyright (C) 2017-2018 Andrew Cagney
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version. See <https://www.gnu.org/licenses/gpl2.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
ifndef top_srcdir
include ../../mk/dirs.mk
endif
include $(top_srcdir)/mk/config.mk
# Cryptographic Algorithm Validation Program (CAVP)
# see: http://csrc.nist.gov/groups/STM/cavp/index.html
PROGRAM = cavp
# XXX: Hack to suppress the man page. Should one be added?
PROGRAM_MANPAGE =
OBJS += cavp.o
OBJS += cavps.o
OBJS += cavp_print.o
OBJS += cavp_parser.o
OBJS += cavp_entry.o
ifeq ($(USE_IKEv1),true)
OBJS += test_ikev1.o
OBJS += test_ikev1_psk.o
OBJS += test_ikev1_dsa.o
USERLAND_CFLAGS += -DUSE_IKEv1
endif
OBJS += test_ikev2.o
OBJS += test_sha.o
OBJS += test_hmac.o
OBJS += test_gcm.o
OBJS += acvp.o
OBJS += $(LIBRESWANLIB)
OBJS += $(LSWTOOLLIBS)
USERLAND_LDFLAGS += $(NSS_LDFLAGS)
USERLAND_LDFLAGS += $(NSPR_LDFLAGS)
default: local-check
.PHONY: default
ifeq ($(USE_IKEv1),true)
TESTCHECKS = test.acvp.ikev2.ok test.acvp.ikev1_dsa.ok test.acvp.ikev1_psk.ok
else
TESTCHECKS = test.acvp.ikev2.ok
endif
local-check: $(TESTCHECKS)
.PRECIOUS: %.fax
test.cavp.%.fax: | $(builddir)
echo $@ $*
curl -o $(builddir)/$@.bz2 https://download.libreswan.org/cavs/$*.fax.bz2
bunzip2 $(builddir)/$@.bz2
.PRECIOUS: %.out
test.cavp.%.out: test.cavp.%.fax $(PROGRAM)
$(builddir)/cavp \
$(builddir)/test.cavp.$*.fax \
> $(builddir)/test.cavp.$*.tmp
mv $(builddir)/test.cavp.$*.tmp $(builddir)/test.cavp.$*.out
test.cavp.%.ok: test.cavp.%.out test.cavp.%.fax
diff -u $(builddir)/test.cavp.$*.fax $(builddir)/test.cavp.$*.out
touch $(builddir)/$@
.PRECIOUS: %.out
test.acvp.%.out: test.acvp.%.run $(PROGRAM)
CAVP=$(builddir)/cavp \
$(srcdir)/test.acvp.$*.run \
> $(builddir)/test.acvp.$*.tmp
mv $(builddir)/test.acvp.$*.tmp $(builddir)/test.acvp.$*.out
test.acvp.%.ok: test.acvp.%.json test.acvp.%.out
diff -u $(srcdir)/test.acvp.$*.json $(builddir)/test.acvp.$*.out
touch $(builddir)/$@
clean: clean.cavp
clean.cavp:
rm -f $(builddir)/*.ok
rm -f $(builddir)/*.fax
rm -f $(builddir)/*.fax.bz2
rm -f $(builddir)/*.out
rm -f $(builddir)/*.tmp
include $(top_srcdir)/mk/program.mk
|