2015-01-05 16:12:27 +01:00
|
|
|
TESTS=test-base64 test-md4 test-milenage \
|
2014-05-19 22:22:49 +02:00
|
|
|
test-rsa-sig-ver \
|
2012-08-07 12:30:13 +02:00
|
|
|
test-sha1 \
|
2011-11-24 19:54:20 +01:00
|
|
|
test-sha256 test-aes test-asn1 test-x509 test-x509v3 test-list test-rc4
|
2009-12-05 19:43:07 +01:00
|
|
|
|
|
|
|
all: $(TESTS)
|
|
|
|
|
|
|
|
ifndef CC
|
|
|
|
CC=gcc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef LDO
|
|
|
|
LDO=$(CC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CFLAGS
|
|
|
|
CFLAGS = -MMD -O2 -Wall -g
|
|
|
|
endif
|
|
|
|
|
2019-02-09 20:07:24 +01:00
|
|
|
ifdef TEST_FUZZ
|
|
|
|
CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
|
|
|
CFLAGS += -DTEST_FUZZ
|
|
|
|
endif
|
|
|
|
|
2019-02-10 16:02:49 +01:00
|
|
|
CFLAGS += -DCONFIG_IEEE80211R_AP
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211W
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211R
|
|
|
|
CFLAGS += -DCONFIG_TDLS
|
|
|
|
|
2009-12-05 19:43:07 +01:00
|
|
|
CFLAGS += -I../src
|
2009-12-05 20:14:08 +01:00
|
|
|
CFLAGS += -I../src/utils
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-06 16:18:28 +01:00
|
|
|
SLIBS = ../src/utils/libutils.a
|
|
|
|
|
|
|
|
DLIBS = ../src/crypto/libcrypto.a \
|
2019-02-10 16:02:49 +01:00
|
|
|
../src/common/libcommon.a \
|
|
|
|
../src/ap/libap.a \
|
|
|
|
../src/eapol_auth/libeapol_auth.a \
|
|
|
|
../src/eapol_supp/libeapol_supp.a \
|
|
|
|
../src/eap_peer/libeap_peer.a \
|
|
|
|
../src/eap_server/libeap_server.a \
|
|
|
|
../src/eap_common/libeap_common.a \
|
|
|
|
../src/radius/libradius.a \
|
|
|
|
../src/l2_packet/libl2_packet.a \
|
|
|
|
../src/wps/libwps.a \
|
|
|
|
../src/rsn_supp/librsn_supp.a \
|
2009-12-06 15:45:36 +01:00
|
|
|
../src/tls/libtls.a
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-06 16:18:28 +01:00
|
|
|
LIBS = $(SLIBS) $(DLIBS)
|
|
|
|
LLIBS = -Wl,--start-group $(DLIBS) -Wl,--end-group $(SLIBS)
|
|
|
|
|
2014-01-03 16:41:16 +01:00
|
|
|
# glibc < 2.17 needs -lrt for clock_gettime()
|
|
|
|
LLIBS += -lrt
|
|
|
|
|
2009-12-05 20:39:41 +01:00
|
|
|
../src/utils/libutils.a:
|
|
|
|
$(MAKE) -C ../src/utils
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2019-02-10 16:02:49 +01:00
|
|
|
../src/common/libcommon.a:
|
|
|
|
$(MAKE) -C ../src/common
|
|
|
|
|
2009-12-05 21:03:46 +01:00
|
|
|
../src/crypto/libcrypto.a:
|
|
|
|
$(MAKE) -C ../src/crypto
|
|
|
|
|
2009-12-06 15:45:36 +01:00
|
|
|
../src/tls/libtls.a:
|
|
|
|
$(MAKE) -C ../src/tls
|
|
|
|
|
2019-02-10 16:02:49 +01:00
|
|
|
../src/ap/libap.a:
|
|
|
|
$(MAKE) -C ../src/ap
|
|
|
|
|
|
|
|
../src/radius/libradius.a:
|
|
|
|
$(MAKE) -C ../src/radius
|
|
|
|
|
|
|
|
../src/l2_packet/libl2_packet.a:
|
|
|
|
$(MAKE) -C ../src/l2_packet
|
|
|
|
|
|
|
|
../src/wps/libwps.a:
|
|
|
|
$(MAKE) -C ../src/wps
|
|
|
|
|
|
|
|
../src/eap_peer/libeap_peer.a:
|
|
|
|
$(MAKE) -C ../src/eap_peer
|
|
|
|
|
|
|
|
../src/eap_server/libeap_server.a:
|
|
|
|
$(MAKE) -C ../src/eap_server
|
|
|
|
|
|
|
|
../src/eap_common/libeap_common.a:
|
|
|
|
$(MAKE) -C ../src/eap_common
|
|
|
|
|
|
|
|
../src/eapol_auth/libeapol_auth.a:
|
|
|
|
$(MAKE) -C ../src/eapol_auth
|
|
|
|
|
|
|
|
../src/eapol_supp/libeapol_supp.a:
|
|
|
|
$(MAKE) -C ../src/eapol_supp
|
|
|
|
|
|
|
|
../src/rsn_supp/librsn_supp.a:
|
|
|
|
$(MAKE) -C ../src/rsn_supp
|
|
|
|
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-05 21:25:32 +01:00
|
|
|
test-aes: test-aes.o $(LIBS)
|
2012-09-08 23:25:54 +02:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 21:25:32 +01:00
|
|
|
|
2009-12-06 15:45:36 +01:00
|
|
|
test-asn1: test-asn1.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-06 15:45:36 +01:00
|
|
|
|
2009-12-05 21:14:55 +01:00
|
|
|
test-base64: test-base64.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2019-02-10 16:02:49 +01:00
|
|
|
test-eapol: test-eapol.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2011-11-13 09:49:27 +01:00
|
|
|
test-https: test-https.o $(LIBS)
|
2019-02-09 16:05:36 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
|
|
|
test-https_server: test-https_server.o $(LIBS)
|
2011-11-13 09:49:27 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2019-02-09 20:38:56 +01:00
|
|
|
test-json: test-json.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
|
|
|
|
2009-12-19 12:43:25 +01:00
|
|
|
test-list: test-list.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-19 12:43:25 +01:00
|
|
|
|
2009-12-05 21:11:50 +01:00
|
|
|
test-md4: test-md4.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2009-12-05 21:14:55 +01:00
|
|
|
test-milenage: test-milenage.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2011-11-24 19:54:20 +01:00
|
|
|
test-rc4: test-rc4.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2011-11-24 19:54:20 +01:00
|
|
|
|
2014-05-19 22:22:49 +02:00
|
|
|
test-rsa-sig-ver: test-rsa-sig-ver.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2009-12-05 21:25:32 +01:00
|
|
|
test-sha1: test-sha1.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 21:25:32 +01:00
|
|
|
|
|
|
|
test-sha256: test-sha256.o $(LIBS)
|
2014-01-03 16:41:16 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 21:25:32 +01:00
|
|
|
|
2019-02-09 20:07:24 +01:00
|
|
|
test-tls: test-tls.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2009-12-06 15:45:36 +01:00
|
|
|
test-x509: test-x509.o $(LIBS)
|
2009-12-06 16:18:28 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
2009-12-06 15:45:36 +01:00
|
|
|
|
2009-12-06 17:10:52 +01:00
|
|
|
test-x509v3: test-x509v3.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2009-12-05 20:14:08 +01:00
|
|
|
|
|
|
|
run-tests: $(TESTS)
|
2009-12-05 21:25:32 +01:00
|
|
|
./test-aes
|
2009-12-19 12:43:25 +01:00
|
|
|
./test-list
|
2009-12-05 21:11:50 +01:00
|
|
|
./test-md4
|
2009-12-05 20:14:08 +01:00
|
|
|
./test-milenage
|
2014-05-19 22:22:49 +02:00
|
|
|
./test-rsa-sig-ver
|
2009-12-05 21:25:32 +01:00
|
|
|
./test-sha1
|
|
|
|
./test-sha256
|
|
|
|
@echo
|
|
|
|
@echo All tests completed successfully.
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2009-12-05 19:43:07 +01:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
2009-12-05 19:44:12 +01:00
|
|
|
rm -f $(TESTS) *~ *.o *.d
|
2019-02-10 16:02:49 +01:00
|
|
|
rm -f test-eapol
|
2012-01-01 18:09:18 +01:00
|
|
|
rm -f test-https
|
2019-02-09 20:38:56 +01:00
|
|
|
rm -f test-json
|
2019-02-09 20:07:24 +01:00
|
|
|
rm -f test-tls
|
2009-12-06 17:10:52 +01:00
|
|
|
rm -f test_x509v3_nist.out.*
|
|
|
|
rm -f test_x509v3_nist2.out.*
|
2009-12-05 19:44:12 +01:00
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|