2 use File::Spec::Functions;
5 my ($base, $files) = @_;
6 return join(" ", map { "$base/$_" } split(/\s+/, $files));
9 $config{target} =~ /^vms-/ ? "../apps/vms_term_sock.c" : "";
12 IF[{- !$disabled{tests} -}]
16 ectest ecdsatest ecdhtest gmdifftest pbelutest ideatest \
19 rc2test rc4test rc5test \
20 destest sha1test sha256t sha512t \
22 randtest dhtest enginetest casttest \
23 bftest ssltest_old dsatest exptest rsa_test \
24 evp_test evp_extra_test igetest v3nametest v3ext \
25 crltest danetest bad_dtls_test \
26 constant_time_test verify_extra_test clienthellotest \
27 packettest asynctest secmemtest srptest memleaktest \
28 dtlsv1listentest ct_test threadstest afalgtest d2i_test \
29 ssl_test_ctx_test ssl_test x509aux cipherlist_test asynciotest \
30 bioprinttest sslapitest dtlstest sslcorrupttest bio_enc_test \
31 pkey_meth_test uitest cipherbytes_test x509_time_test
33 SOURCE[aborttest]=aborttest.c
34 INCLUDE[aborttest]=../include
35 DEPEND[aborttest]=../libcrypto
37 SOURCE[sanitytest]=sanitytest.c
38 INCLUDE[sanitytest]=../include
39 DEPEND[sanitytest]=../libcrypto
41 SOURCE[bntest]=bntest.c testutil.c test_main_custom.c
42 INCLUDE[bntest]=.. ../crypto/include ../include
43 DEPEND[bntest]=../libcrypto
45 SOURCE[ectest]=ectest.c
46 INCLUDE[ectest]=../include
47 DEPEND[ectest]=../libcrypto
49 SOURCE[ecdsatest]=ecdsatest.c
50 INCLUDE[ecdsatest]=../include
51 DEPEND[ecdsatest]=../libcrypto
53 SOURCE[ecdhtest]=ecdhtest.c
54 INCLUDE[ecdhtest]=../include
55 DEPEND[ecdhtest]=../libcrypto
57 SOURCE[gmdifftest]=gmdifftest.c
58 INCLUDE[gmdifftest]=../include
59 DEPEND[gmdifftest]=../libcrypto
61 SOURCE[pbelutest]=pbelutest.c
62 INCLUDE[pbelutest]=../include
63 DEPEND[pbelutest]=../libcrypto
65 SOURCE[ideatest]=ideatest.c
66 INCLUDE[ideatest]=../include
67 DEPEND[ideatest]=../libcrypto
69 SOURCE[md2test]=md2test.c
70 INCLUDE[md2test]=../include
71 DEPEND[md2test]=../libcrypto
73 SOURCE[hmactest]=hmactest.c
74 INCLUDE[hmactest]=../include
75 DEPEND[hmactest]=../libcrypto
77 SOURCE[rc2test]=rc2test.c
78 INCLUDE[rc2test]=../include
79 DEPEND[rc2test]=../libcrypto
81 SOURCE[rc4test]=rc4test.c
82 INCLUDE[rc4test]=../include
83 DEPEND[rc4test]=../libcrypto
85 SOURCE[rc5test]=rc5test.c
86 INCLUDE[rc5test]=../include
87 DEPEND[rc5test]=../libcrypto
89 SOURCE[destest]=destest.c
90 INCLUDE[destest]=../include
91 DEPEND[destest]=../libcrypto
93 SOURCE[sha1test]=sha1test.c
94 INCLUDE[sha1test]=../include
95 DEPEND[sha1test]=../libcrypto
97 SOURCE[sha256t]=sha256t.c
98 INCLUDE[sha256t]=../include
99 DEPEND[sha256t]=../libcrypto
101 SOURCE[sha512t]=sha512t.c
102 INCLUDE[sha512t]=../include
103 DEPEND[sha512t]=../libcrypto
105 SOURCE[mdc2test]=mdc2test.c
106 INCLUDE[mdc2test]=../include
107 DEPEND[mdc2test]=../libcrypto
109 SOURCE[randtest]=randtest.c
110 INCLUDE[randtest]=../include
111 DEPEND[randtest]=../libcrypto
113 SOURCE[dhtest]=dhtest.c
114 INCLUDE[dhtest]=../include
115 DEPEND[dhtest]=../libcrypto
117 SOURCE[enginetest]=enginetest.c
118 INCLUDE[enginetest]=../include
119 DEPEND[enginetest]=../libcrypto
121 SOURCE[casttest]=casttest.c
122 INCLUDE[casttest]=../include
123 DEPEND[casttest]=../libcrypto
125 SOURCE[bftest]=bftest.c
126 INCLUDE[bftest]=../include
127 DEPEND[bftest]=../libcrypto
129 SOURCE[ssltest_old]=ssltest_old.c
130 INCLUDE[ssltest_old]=.. ../include
131 DEPEND[ssltest_old]=../libcrypto ../libssl
133 SOURCE[dsatest]=dsatest.c
134 INCLUDE[dsatest]=../include
135 DEPEND[dsatest]=../libcrypto
137 SOURCE[exptest]=exptest.c
138 INCLUDE[exptest]=../include
139 DEPEND[exptest]=../libcrypto
141 SOURCE[rsa_test]=rsa_test.c
142 INCLUDE[rsa_test]=.. ../include
143 DEPEND[rsa_test]=../libcrypto
145 SOURCE[evp_test]=evp_test.c
146 INCLUDE[evp_test]=../include
147 DEPEND[evp_test]=../libcrypto
149 SOURCE[evp_extra_test]=evp_extra_test.c
150 INCLUDE[evp_extra_test]=../include
151 DEPEND[evp_extra_test]=../libcrypto
153 SOURCE[igetest]=igetest.c
154 INCLUDE[igetest]=.. ../include
155 DEPEND[igetest]=../libcrypto
157 SOURCE[v3nametest]=v3nametest.c
158 INCLUDE[v3nametest]=../include
159 DEPEND[v3nametest]=../libcrypto
161 SOURCE[crltest]=crltest.c testutil.c test_main.c
162 INCLUDE[crltest]=../include
163 DEPEND[crltest]=../libcrypto
165 SOURCE[v3ext]=v3ext.c
166 INCLUDE[v3ext]=../include
167 DEPEND[v3ext]=../libcrypto
169 SOURCE[danetest]=danetest.c
170 INCLUDE[danetest]=../include
171 DEPEND[danetest]=../libcrypto ../libssl
173 SOURCE[constant_time_test]=constant_time_test.c
174 INCLUDE[constant_time_test]=.. ../include
175 DEPEND[constant_time_test]=../libcrypto
177 SOURCE[verify_extra_test]=verify_extra_test.c
178 INCLUDE[verify_extra_test]=../include
179 DEPEND[verify_extra_test]=../libcrypto
181 SOURCE[clienthellotest]=clienthellotest.c
182 INCLUDE[clienthellotest]=../include
183 DEPEND[clienthellotest]=../libcrypto ../libssl
185 SOURCE[bad_dtls_test]=bad_dtls_test.c
186 INCLUDE[bad_dtls_test]=../include
187 DEPEND[bad_dtls_test]=../libcrypto ../libssl
189 SOURCE[packettest]=packettest.c
190 INCLUDE[packettest]=../include
191 DEPEND[packettest]=../libcrypto
193 SOURCE[asynctest]=asynctest.c
194 INCLUDE[asynctest]=.. ../include
195 DEPEND[asynctest]=../libcrypto
197 SOURCE[secmemtest]=secmemtest.c
198 INCLUDE[secmemtest]=../include
199 DEPEND[secmemtest]=../libcrypto
201 SOURCE[srptest]=srptest.c
202 INCLUDE[srptest]=../include
203 DEPEND[srptest]=../libcrypto
205 SOURCE[memleaktest]=memleaktest.c
206 INCLUDE[memleaktest]=../include
207 DEPEND[memleaktest]=../libcrypto
209 SOURCE[dtlsv1listentest]=dtlsv1listentest.c
210 INCLUDE[dtlsv1listentest]=.. ../include
211 DEPEND[dtlsv1listentest]=../libssl
213 SOURCE[ct_test]=ct_test.c testutil.c test_main_custom.c
214 INCLUDE[ct_test]=../crypto/include ../include
215 DEPEND[ct_test]=../libcrypto
217 SOURCE[threadstest]=threadstest.c
218 INCLUDE[threadstest]=.. ../include
219 DEPEND[threadstest]=../libcrypto
221 SOURCE[afalgtest]=afalgtest.c
222 INCLUDE[afalgtest]=.. ../include
223 DEPEND[afalgtest]=../libcrypto
225 SOURCE[d2i_test]=d2i_test.c testutil.c test_main_custom.c
226 INCLUDE[d2i_test]=.. ../include
227 DEPEND[d2i_test]=../libcrypto
229 SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c testutil.c test_main_custom.c
230 INCLUDE[ssl_test_ctx_test]=.. ../include
231 DEPEND[ssl_test_ctx_test]=../libcrypto
233 SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c testutil.c handshake_helper.c test_main_custom.c
234 INCLUDE[ssl_test]=.. ../include
235 DEPEND[ssl_test]=../libcrypto ../libssl
237 SOURCE[cipherlist_test]=cipherlist_test.c testutil.c test_main.c
238 INCLUDE[cipherlist_test]=.. ../include
239 DEPEND[cipherlist_test]=../libcrypto ../libssl
241 INCLUDE[testutil.o]=..
242 INCLUDE[ssl_test_ctx.o]=../include
243 INCLUDE[handshake_helper.o]=../include
244 INCLUDE[ssltestlib.o]=../include
246 SOURCE[x509aux]=x509aux.c
247 INCLUDE[x509aux]=../include
248 DEPEND[x509aux]=../libcrypto
250 SOURCE[asynciotest]=asynciotest.c ssltestlib.c
251 INCLUDE[asynciotest]=../include
252 DEPEND[asynciotest]=../libcrypto ../libssl
254 SOURCE[bioprinttest]=bioprinttest.c
255 INCLUDE[bioprinttest]=../include
256 DEPEND[bioprinttest]=../libcrypto
258 SOURCE[sslapitest]=sslapitest.c ssltestlib.c testutil.c test_main_custom.c
259 INCLUDE[sslapitest]=../include ..
260 DEPEND[sslapitest]=../libcrypto ../libssl
262 SOURCE[dtlstest]=dtlstest.c ssltestlib.c testutil.c test_main_custom.c
263 INCLUDE[dtlstest]=../include .
264 DEPEND[dtlstest]=../libcrypto ../libssl
266 SOURCE[sslcorrupttest]=sslcorrupttest.c ssltestlib.c testutil.c
267 INCLUDE[sslcorrupttest]=../include .
268 DEPEND[sslcorrupttest]=../libcrypto ../libssl
270 SOURCE[bio_enc_test]=bio_enc_test.c
271 INCLUDE[bio_enc_test]=../include
272 DEPEND[bio_enc_test]=../libcrypto
274 SOURCE[pkey_meth_test]=pkey_meth_test.c testutil.c test_main.c
275 INCLUDE[pkey_meth_test]=../include
276 DEPEND[pkey_meth_test]=../libcrypto
278 SOURCE[x509_time_test]=x509_time_test.c testutil.c test_main.c
279 INCLUDE[x509_time_test]=.. ../include
280 DEPEND[x509_time_test]=../libcrypto
282 IF[{- !$disabled{psk} -}]
283 PROGRAMS_NO_INST=dtls_mtu_test
284 SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
285 INCLUDE[dtls_mtu_test]=.. ../include
286 DEPEND[dtls_mtu_test]=../libcrypto ../libssl
289 IF[{- !$disabled{shared} -}]
290 PROGRAMS_NO_INST=shlibloadtest
291 SOURCE[shlibloadtest]=shlibloadtest.c
292 INCLUDE[shlibloadtest]=../include
295 IF[{- $disabled{shared} -}]
296 PROGRAMS_NO_INST=cipher_overhead_test
297 SOURCE[cipher_overhead_test]=cipher_overhead_test.c
298 INCLUDE[cipher_overhead_test]=.. ../include
299 DEPEND[cipher_overhead_test]=../libcrypto ../libssl
302 SOURCE[uitest]=uitest.c testutil.c test_main_custom.c \
303 ../apps/apps.c ../apps/opt.c {- $apps_extra -}
304 INCLUDE[uitest]=.. ../include
305 DEPEND[uitest]=../libcrypto ../libssl
307 SOURCE[cipherbytes_test]=cipherbytes_test.c
308 INCLUDE[cipherbytes_test]=.. ../include
309 DEPEND[cipherbytes_test]=../libcrypto ../libssl
311 # Internal test programs. These are essentially a collection of internal
312 # test routines. Some of them need to reach internal symbols that aren't
313 # available through the shared library (at least on Linux, Solaris, Windows
314 # and VMS, where the exported symbols are those listed in util/*.num), these
315 # programs are forcebly linked with the static libraries, where all symbols
316 # are always available. This excludes linking these programs natively on
317 # Windows when building shared libraries, since the static libraries share
318 # names with the DLL import libraries.
319 IF[{- $disabled{shared} || $target{build_scheme}->[1] ne 'windows' -}]
320 PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test \
321 tls13encryptiontest wpackettest
322 IF[{- !$disabled{poly1305} -}]
323 PROGRAMS_NO_INST=poly1305_internal_test
325 IF[{- !$disabled{siphash} -}]
326 PROGRAMS_NO_INST=siphash_internal_test
329 SOURCE[poly1305_internal_test]=poly1305_internal_test.c testutil.c test_main_custom.c
330 INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include
331 DEPEND[poly1305_internal_test]=../libcrypto.a
333 SOURCE[asn1_internal_test]=asn1_internal_test.c testutil.c test_main.c
334 INCLUDE[asn1_internal_test]=.. ../include ../crypto/include
335 DEPEND[asn1_internal_test]=../libcrypto.a
337 SOURCE[modes_internal_test]=modes_internal_test.c testutil.c test_main_custom.c
338 INCLUDE[modes_internal_test]=.. ../include
339 DEPEND[modes_internal_test]=../libcrypto.a
341 SOURCE[x509_internal_test]=x509_internal_test.c testutil.c test_main.c
342 INCLUDE[x509_internal_test]=.. ../include
343 DEPEND[x509_internal_test]=../libcrypto.a
345 SOURCE[tls13encryptiontest]=tls13encryptiontest.c testutil.c test_main.c
346 INCLUDE[tls13encryptiontest]=.. ../include
347 DEPEND[tls13encryptiontest]=../libcrypto ../libssl.a
349 SOURCE[wpackettest]=wpackettest.c testutil.c test_main_custom.c
350 INCLUDE[wpackettest]=../include
351 DEPEND[wpackettest]=../libcrypto ../libssl.a
353 SOURCE[siphash_internal_test]=siphash_internal_test.c testutil.c test_main_custom.c
354 INCLUDE[siphash_internal_test]=.. ../include ../crypto/include
355 DEPEND[siphash_internal_test]=../libcrypto.a
358 IF[{- !$disabled{mdc2} -}]
359 PROGRAMS_NO_INST=mdc2_internal_test
362 SOURCE[mdc2_internal_test]=mdc2_internal_test.c testutil.c test_main.c
363 INCLUDE[mdc2_internal_test]=.. ../include
364 DEPEND[mdc2_internal_test]=../libcrypto
366 # We disable this test completely in a shared build because it deliberately
367 # redefines some internal libssl symbols. This doesn't work in a non-shared
369 IF[{- !$disabled{shared} -}]
370 PROGRAMS_NO_INST=tls13secretstest
371 SOURCE[tls13secretstest]=tls13secretstest.c testutil.c test_main.c
372 SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
373 INCLUDE[tls13secretstest]=.. ../include
374 DEPEND[tls13secretstest]=../libcrypto ../libssl
379 use File::Spec::Functions;
381 use if $^O ne "VMS", 'File::Glob' => qw/glob/;
383 my @nogo_headers = ( "asn1_mac.h",
384 "__decc_include_prologue.h",
385 "__decc_include_epilogue.h" );
386 my @headerfiles = glob catfile($sourcedir,
387 updir(), "include", "openssl", "*.h");
389 foreach my $headerfile (@headerfiles) {
390 my $name = basename($headerfile, ".h");
391 next if $disabled{$name};
392 next if grep { $_ eq lc("$name.h") } @nogo_headers;
395 PROGRAMS_NO_INST=buildtest_$name
396 GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
397 SOURCE[buildtest_$name]=buildtest_$name.c
398 INCLUDE[buildtest_$name]=../include
399 DEPEND[buildtest_$name]=../libssl ../libcrypto