Debian Codegraph @

test/cryptounittest/Makefile.inc

raw
1 # Aircrack-ng
2 #
3 # Copyright (C) 2017-2022 Joseph Benden <[email protected]>
4 #
5 # Autotool support was written by: Joseph Benden <[email protected]>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #
21 # In addition, as a special exception, the copyright holders give
22 # permission to link the code of portions of this program with the
23 # OpenSSL library under certain conditions as described in each
24 # individual source file, and distribute linked combinations
25 # including the two.
26 #
27 # You must obey the GNU General Public License in all respects
28 # for all of the code used other than OpenSSL.
29 #
30 # If you modify file(s) with this exception, you may extend this
31 # exception to your dnl version of the file(s), but you are not obligated
32 # to do so.
33 #
34 # If you dnl do not wish to do so, delete this exception statement from your
35 # version.
36 #
37 # If you delete this exception statement from all source files in the
38 # program, then also delete it here.
39
40 SRCS_TEST_EWEP = %D%/test-encrypt-wep.c
41 SRCS_TEST_CPMK = %D%/test-calc-pmk.c
42 SRCS_TEST_CMIC = %D%/test-calc-mic.c
43 SRCS_TEST_CPTK = %D%/test-calc-ptk.c
44 SRCS_TEST_DCMP = %D%/test-decrypt-ccmp.c
45 SRCS_TEST_ECMP = %D%/test-encrypt-ccmp.c
46
47 test_encrypt_wep_SOURCES = $(SRCS_TEST_EWEP)
48 test_encrypt_wep_CFLAGS = $(PTHREAD_CFLAGS) \
49 $(CRYPTO_CFLAGS)
50 test_encrypt_wep_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
51 $(PTHREAD_LIBS) \
52 $(CRYPTO_LDFLAGS) \
53 $(CRYPTO_LIBS) \
54 $(ZLIB_LIBS)
55
56 test_calc_pmk_SOURCES = $(SRCS_TEST_CPMK)
57 test_calc_pmk_CFLAGS = $(PTHREAD_CFLAGS) \
58 $(CRYPTO_CFLAGS)
59 test_calc_pmk_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
60 $(LIBAIRCRACK_CE_WPA_LIBS) \
61 $(PTHREAD_LIBS) \
62 $(CRYPTO_LDFLAGS) \
63 $(CRYPTO_LIBS) \
64 $(ZLIB_LIBS)
65
66 test_calc_mic_SOURCES = $(SRCS_TEST_CMIC)
67 test_calc_mic_CFLAGS = $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS)
68 test_calc_mic_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
69 $(PTHREAD_LIBS) \
70 $(CRYPTO_LDFLAGS) \
71 $(CRYPTO_LIBS) \
72 $(ZLIB_LIBS)
73
74 test_calc_ptk_SOURCES = $(SRCS_TEST_CPTK)
75 test_calc_ptk_CFLAGS = $(PTHREAD_CFLAGS) \
76 $(CRYPTO_CFLAGS)
77 test_calc_ptk_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
78 $(PTHREAD_LIBS) \
79 $(CRYPTO_LDFLAGS) \
80 $(CRYPTO_LIBS) \
81 $(ZLIB_LIBS)
82
83 test_cipher_arcfour_SOURCES = %D%/test-cipher-arcfour.c
84 test_cipher_arcfour_CFLAGS = $(PTHREAD_CFLAGS) \
85 $(CRYPTO_CFLAGS)
86 test_cipher_arcfour_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
87 $(PTHREAD_LIBS) \
88 $(CRYPTO_LDFLAGS) \
89 $(CRYPTO_LIBS) \
90 $(ZLIB_LIBS)
91
92 test_digest_md5_SOURCES = %D%/test-digest-md5.c
93 test_digest_md5_CFLAGS = $(PTHREAD_CFLAGS) \
94 $(CRYPTO_CFLAGS)
95 test_digest_md5_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
96 $(PTHREAD_LIBS) \
97 $(CRYPTO_LDFLAGS) \
98 $(CRYPTO_LIBS) \
99 $(ZLIB_LIBS)
100
101 test_mac_hmac_md5_SOURCES = %D%/test-mac-hmac-md5.c
102 test_mac_hmac_md5_CFLAGS = $(PTHREAD_CFLAGS) \
103 $(CRYPTO_CFLAGS)
104 test_mac_hmac_md5_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
105 $(PTHREAD_LIBS) \
106 $(CRYPTO_LDFLAGS) \
107 $(CRYPTO_LIBS) \
108 $(ZLIB_LIBS)
109
110 test_mac_hmac_sha1_SOURCES = %D%/test-mac-hmac-sha1.c
111 test_mac_hmac_sha1_CFLAGS = $(PTHREAD_CFLAGS) \
112 $(CRYPTO_CFLAGS)
113 test_mac_hmac_sha1_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
114 $(PTHREAD_LIBS) \
115 $(CRYPTO_LDFLAGS) \
116 $(CRYPTO_LIBS) \
117 $(ZLIB_LIBS)
118
119 test_mac_hmac_sha256_SOURCES = %D%/test-mac-hmac-sha256.c
120 test_mac_hmac_sha256_CFLAGS = $(PTHREAD_CFLAGS) \
121 $(CRYPTO_CFLAGS)
122 test_mac_hmac_sha256_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
123 $(PTHREAD_LIBS) \
124 $(CRYPTO_LDFLAGS) \
125 $(CRYPTO_LIBS) \
126 $(ZLIB_LIBS)
127
128 test_digest_sha1_SOURCES = %D%/test-digest-sha1.c
129 test_digest_sha1_CFLAGS = $(PTHREAD_CFLAGS) \
130 $(CRYPTO_CFLAGS)
131 test_digest_sha1_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
132 $(PTHREAD_LIBS) \
133 $(CRYPTO_LDFLAGS) \
134 $(CRYPTO_LIBS) \
135 $(ZLIB_LIBS)
136
137 test_kdf_pbkdf2_hmac_sha1_SOURCES = %D%/test-kdf-pbkdf2-hmac-sha1.c
138 test_kdf_pbkdf2_hmac_sha1_CFLAGS = $(PTHREAD_CFLAGS) \
139 $(CRYPTO_CFLAGS)
140 test_kdf_pbkdf2_hmac_sha1_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
141 $(PTHREAD_LIBS) \
142 $(CRYPTO_LDFLAGS) \
143 $(CRYPTO_LIBS) \
144 $(ZLIB_LIBS)
145
146 test_encrypt_ccmp_SOURCES = $(SRCS_TEST_ECMP)
147 test_encrypt_ccmp_CFLAGS = $(PTHREAD_CFLAGS) \
148 $(CRYPTO_CFLAGS)
149 test_encrypt_ccmp_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
150 $(PTHREAD_LIBS) \
151 $(CRYPTO_LDFLAGS) \
152 $(CRYPTO_LIBS) \
153 $(ZLIB_LIBS)
154
155 test_decrypt_ccmp_SOURCES = $(SRCS_TEST_DCMP)
156 test_decrypt_ccmp_CFLAGS = $(PTHREAD_CFLAGS) \
157 $(CRYPTO_CFLAGS)
158 test_decrypt_ccmp_LDADD = $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_LIBS) \
159 $(PTHREAD_LIBS) \
160 $(CRYPTO_LDFLAGS) \
161 $(CRYPTO_LIBS) \
162 $(ZLIB_LIBS)
163
164
165 TESTS += test-encrypt-wep \
166 test-calc-pmk \
167 test-calc-mic \
168 test-calc-ptk \
169 test-cipher-arcfour \
170 test-digest-md5 \
171 test-digest-sha1 \
172 test-encrypt-ccmp \
173 test-decrypt-ccmp \
174 test-mac-hmac-md5 \
175 test-mac-hmac-sha1 \
176 test-mac-hmac-sha256 \
177 test-kdf-pbkdf2-hmac-sha1
178
179 check_PROGRAMS += test-encrypt-wep \
180 test-calc-pmk \
181 test-calc-mic \
182 test-calc-ptk \
183 test-cipher-arcfour \
184 test-digest-md5 \
185 test-digest-sha1 \
186 test-encrypt-ccmp \
187 test-decrypt-ccmp \
188 test-mac-hmac-md5 \
189 test-mac-hmac-sha1 \
190 test-mac-hmac-sha256 \
191 test-kdf-pbkdf2-hmac-sha1
192
193 EXTRA_DIST += %D%/tests.h