|
| 1 | +# OpenS/WAN testing makefile |
| 2 | +# Copyright (C) 2018 Bart Trojanowski <[email protected]> |
| 3 | +# Copyright (C) 2014 Michael Richardson <[email protected]> |
| 4 | +# Copyright (C) 2002 Michael Richardson <[email protected]> |
| 5 | +# |
| 6 | +# This program is free software; you can redistribute it and/or modify it |
| 7 | +# under the terms of the GNU General Public License as published by the |
| 8 | +# Free Software Foundation; either version 2 of the License, or (at your |
| 9 | +# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. |
| 10 | +# |
| 11 | +# This program is distributed in the hope that it will be useful, but |
| 12 | +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 13 | +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | +# for more details. |
| 15 | + |
| 16 | +OPENSWANSRCDIR?=$(shell cd ../../../..; pwd) |
| 17 | +srcdir?=${OPENSWANSRCDIR}/tests/unit/libpluto/lp01-spdbtest |
| 18 | +include $(OPENSWANSRCDIR)/Makefile.inc |
| 19 | + |
| 20 | +EXTRAFLAGS+=${USERCOMPILE} ${PORTINCLUDE} |
| 21 | +EXTRAFLAGS+=-I${OPENSWANSRCDIR}/programs/pluto |
| 22 | +EXTRAFLAGS+=-I${OPENSWANSRCDIR}/include/pluto |
| 23 | +EXTRAFLAGS+=-I${OPENSWANSRCDIR}/include |
| 24 | +EXTRALIBS+=${LIBOSWLOG} ${LIBOPENSWAN} ${LIBOSWLOG} ${LIBOSWKEYS} |
| 25 | +EXTRALIBS+=${NSS_LIBS} ${FIPS_LIBS} ${LIBGMP} ${CRYPTOLIBS} |
| 26 | + |
| 27 | +EXTRAFLAGS+=${NSS_FLAGS} ${FIPS_FLAGS} |
| 28 | +EXTRAFLAGS+=${NSS_HDRDIRS} ${FIPS_HDRDIRS} |
| 29 | + |
| 30 | +TESTNUMBER=lo06-verifybadsigs |
| 31 | +TESTNAME=verifybadsigs |
| 32 | +UNITTESTARGS= |
| 33 | + |
| 34 | +check: ${TESTNAME} |
| 35 | + @mkdir -p OUTPUT |
| 36 | + ${COREULIMIT} && ./${TESTNAME} ${UNITTESTARGS} >OUTPUT/${TESTNAME}.txt 2>&1 |
| 37 | + diff OUTPUT/${TESTNAME}.txt output.txt |
| 38 | + @: recordresults lib-$testobj "$testexpect" "$stat" lib-$testobj false |
| 39 | + |
| 40 | +.PHONY: ${TESTNAME} |
| 41 | +${TESTNAME}: ${TESTNAME}.c |
| 42 | + @echo CC ${TESTNAME}.c |
| 43 | + @${CC} -o ${TESTNAME} ${EXTRAFLAGS} ${TESTNAME}.c ${EXTRALIBS} ${EXTRALIBS} |
| 44 | + @echo "file ${TESTNAME}" >.gdbinit |
| 45 | + @echo "set args "${UNITTESTARGS} >>.gdbinit |
| 46 | + |
| 47 | +update: |
| 48 | + cp OUTPUT/${TESTNAME}.txt output.txt |
| 49 | + |
| 50 | + |
| 51 | +initiate: |
| 52 | + (echo ': RSA {'; ${OBJDIRTOP}/programs/rsasigkey/rsasigkey --random /dev/urandom 512 --hostname fivetwelve; echo ' }') >key-0512.secrets |
| 53 | + (echo ': RSA {'; ${OBJDIRTOP}/programs/rsasigkey/rsasigkey --random /dev/urandom 1024 --hostname fivetwelve; echo ' }') >key-1024.secrets |
| 54 | + (echo ': RSA {'; ${OBJDIRTOP}/programs/rsasigkey/rsasigkey --random /dev/urandom 2048 --hostname fivetwelve; echo ' }') >key-2048.secrets |
| 55 | + (echo ': RSA {'; ${OBJDIRTOP}/programs/rsasigkey/rsasigkey --random /dev/urandom 3072 --hostname fivetwelve; echo ' }') >key-3072.secrets |
| 56 | + (echo ': RSA {'; ${OBJDIRTOP}/programs/rsasigkey/rsasigkey --random /dev/urandom 4096 --hostname fivetwelve; echo ' }') >key-4096.secrets |
| 57 | + (echo ': RSA {'; ${OBJDIRTOP}/programs/rsasigkey/rsasigkey --random /dev/urandom 8192 --hostname fivetwelve; echo ' }') >key-8192.secrets |
| 58 | + |
| 59 | + |
0 commit comments