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} -}]
15 sanitytest exdatatest bntest \
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 lhash_test \
26 constant_time_test verify_extra_test clienthellotest \
27 packettest asynctest secmemtest srptest memleaktest stack_test \
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 recordlentest
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[test_test]=test_test.c testutil.c test_main.c
42 INCLUDE[test_test]=.. ../include
43 DEPEND[test_test]=../libcrypto
45 SOURCE[exdatatest]=exdatatest.c
46 INCLUDE[exdatatest]=../include
47 DEPEND[exdatatest]=../libcrypto
49 SOURCE[bntest]=bntest.c testutil.c test_main_custom.c
50 INCLUDE[bntest]=.. ../crypto/include ../include
51 DEPEND[bntest]=../libcrypto
53 SOURCE[ectest]=ectest.c
54 INCLUDE[ectest]=.. ../include
55 DEPEND[ectest]=../libcrypto
57 SOURCE[ecdsatest]=ecdsatest.c
58 INCLUDE[ecdsatest]=../include
59 DEPEND[ecdsatest]=../libcrypto
61 SOURCE[ecdhtest]=ecdhtest.c
62 INCLUDE[ecdhtest]=../include
63 DEPEND[ecdhtest]=../libcrypto
65 SOURCE[gmdifftest]=gmdifftest.c
66 INCLUDE[gmdifftest]=../include
67 DEPEND[gmdifftest]=../libcrypto
69 SOURCE[pbelutest]=pbelutest.c
70 INCLUDE[pbelutest]=../include
71 DEPEND[pbelutest]=../libcrypto
73 SOURCE[ideatest]=ideatest.c
74 INCLUDE[ideatest]=../include
75 DEPEND[ideatest]=../libcrypto
77 SOURCE[md2test]=md2test.c
78 INCLUDE[md2test]=../include
79 DEPEND[md2test]=../libcrypto
81 SOURCE[hmactest]=hmactest.c
82 INCLUDE[hmactest]=../include
83 DEPEND[hmactest]=../libcrypto
85 SOURCE[rc2test]=rc2test.c
86 INCLUDE[rc2test]=../include
87 DEPEND[rc2test]=../libcrypto
89 SOURCE[rc4test]=rc4test.c
90 INCLUDE[rc4test]=../include
91 DEPEND[rc4test]=../libcrypto
93 SOURCE[rc5test]=rc5test.c
94 INCLUDE[rc5test]=../include
95 DEPEND[rc5test]=../libcrypto
97 SOURCE[destest]=destest.c
98 INCLUDE[destest]=../include
99 DEPEND[destest]=../libcrypto
101 SOURCE[sha1test]=sha1test.c
102 INCLUDE[sha1test]=../include
103 DEPEND[sha1test]=../libcrypto
105 SOURCE[sha256t]=sha256t.c
106 INCLUDE[sha256t]=../include
107 DEPEND[sha256t]=../libcrypto
109 SOURCE[sha512t]=sha512t.c
110 INCLUDE[sha512t]=../include
111 DEPEND[sha512t]=../libcrypto
113 SOURCE[mdc2test]=mdc2test.c
114 INCLUDE[mdc2test]=../include
115 DEPEND[mdc2test]=../libcrypto
117 SOURCE[randtest]=randtest.c
118 INCLUDE[randtest]=../include
119 DEPEND[randtest]=../libcrypto
121 SOURCE[dhtest]=dhtest.c
122 INCLUDE[dhtest]=../include
123 DEPEND[dhtest]=../libcrypto
125 SOURCE[enginetest]=enginetest.c
126 INCLUDE[enginetest]=../include
127 DEPEND[enginetest]=../libcrypto
129 SOURCE[casttest]=casttest.c
130 INCLUDE[casttest]=../include
131 DEPEND[casttest]=../libcrypto
133 SOURCE[bftest]=bftest.c
134 INCLUDE[bftest]=../include
135 DEPEND[bftest]=../libcrypto
137 SOURCE[ssltest_old]=ssltest_old.c
138 INCLUDE[ssltest_old]=.. ../include
139 DEPEND[ssltest_old]=../libcrypto ../libssl
141 SOURCE[dsatest]=dsatest.c
142 INCLUDE[dsatest]=../include
143 DEPEND[dsatest]=../libcrypto
145 SOURCE[exptest]=exptest.c
146 INCLUDE[exptest]=../include
147 DEPEND[exptest]=../libcrypto
149 SOURCE[rsa_test]=rsa_test.c
150 INCLUDE[rsa_test]=.. ../include
151 DEPEND[rsa_test]=../libcrypto
153 SOURCE[evp_test]=evp_test.c
154 INCLUDE[evp_test]=../include
155 DEPEND[evp_test]=../libcrypto
157 SOURCE[evp_extra_test]=evp_extra_test.c
158 INCLUDE[evp_extra_test]=../include
159 DEPEND[evp_extra_test]=../libcrypto
161 SOURCE[igetest]=igetest.c
162 INCLUDE[igetest]=.. ../include
163 DEPEND[igetest]=../libcrypto
165 SOURCE[v3nametest]=v3nametest.c
166 INCLUDE[v3nametest]=../include
167 DEPEND[v3nametest]=../libcrypto
169 SOURCE[crltest]=crltest.c testutil.c test_main.c
170 INCLUDE[crltest]=../include
171 DEPEND[crltest]=../libcrypto
173 SOURCE[v3ext]=v3ext.c
174 INCLUDE[v3ext]=../include
175 DEPEND[v3ext]=../libcrypto
177 SOURCE[danetest]=danetest.c
178 INCLUDE[danetest]=../include
179 DEPEND[danetest]=../libcrypto ../libssl
181 SOURCE[constant_time_test]=constant_time_test.c
182 INCLUDE[constant_time_test]=.. ../include
183 DEPEND[constant_time_test]=../libcrypto
185 SOURCE[verify_extra_test]=verify_extra_test.c
186 INCLUDE[verify_extra_test]=../include
187 DEPEND[verify_extra_test]=../libcrypto
189 SOURCE[clienthellotest]=clienthellotest.c testutil.c test_main_custom.c
190 INCLUDE[clienthellotest]=../include
191 DEPEND[clienthellotest]=../libcrypto ../libssl
193 SOURCE[bad_dtls_test]=bad_dtls_test.c
194 INCLUDE[bad_dtls_test]=../include
195 DEPEND[bad_dtls_test]=../libcrypto ../libssl
197 SOURCE[packettest]=packettest.c
198 INCLUDE[packettest]=../include
199 DEPEND[packettest]=../libcrypto
201 SOURCE[asynctest]=asynctest.c
202 INCLUDE[asynctest]=.. ../include
203 DEPEND[asynctest]=../libcrypto
205 SOURCE[secmemtest]=secmemtest.c
206 INCLUDE[secmemtest]=../include
207 DEPEND[secmemtest]=../libcrypto
209 SOURCE[srptest]=srptest.c
210 INCLUDE[srptest]=../include
211 DEPEND[srptest]=../libcrypto
213 SOURCE[memleaktest]=memleaktest.c
214 INCLUDE[memleaktest]=../include
215 DEPEND[memleaktest]=../libcrypto
217 SOURCE[stack_test]=stack_test.c testutil.c test_main.c
218 INCLUDE[stack_test]=.. ../include
219 DEPEND[stack_test]=../libcrypto
221 SOURCE[lhash_test]=lhash_test.c testutil.c test_main.c
222 INCLUDE[lhash_test]=.. ../include
223 DEPEND[lhash_test]=../libcrypto
225 SOURCE[dtlsv1listentest]=dtlsv1listentest.c
226 INCLUDE[dtlsv1listentest]=.. ../include
227 DEPEND[dtlsv1listentest]=../libssl
229 SOURCE[ct_test]=ct_test.c testutil.c test_main_custom.c
230 INCLUDE[ct_test]=../crypto/include ../include
231 DEPEND[ct_test]=../libcrypto
233 SOURCE[threadstest]=threadstest.c
234 INCLUDE[threadstest]=.. ../include
235 DEPEND[threadstest]=../libcrypto
237 SOURCE[afalgtest]=afalgtest.c
238 INCLUDE[afalgtest]=.. ../include
239 DEPEND[afalgtest]=../libcrypto
241 SOURCE[d2i_test]=d2i_test.c testutil.c test_main_custom.c
242 INCLUDE[d2i_test]=.. ../include
243 DEPEND[d2i_test]=../libcrypto
245 SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c testutil.c test_main_custom.c
246 INCLUDE[ssl_test_ctx_test]=.. ../include
247 DEPEND[ssl_test_ctx_test]=../libcrypto ../libssl
249 SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c testutil.c handshake_helper.c test_main_custom.c
250 INCLUDE[ssl_test]=.. ../include
251 DEPEND[ssl_test]=../libcrypto ../libssl
253 SOURCE[cipherlist_test]=cipherlist_test.c testutil.c test_main.c
254 INCLUDE[cipherlist_test]=.. ../include
255 DEPEND[cipherlist_test]=../libcrypto ../libssl
257 INCLUDE[testutil.o]=..
258 INCLUDE[ssl_test_ctx.o]=../include
259 INCLUDE[handshake_helper.o]=../include
260 INCLUDE[ssltestlib.o]=.. ../include
262 SOURCE[x509aux]=x509aux.c
263 INCLUDE[x509aux]=../include
264 DEPEND[x509aux]=../libcrypto
266 SOURCE[asynciotest]=asynciotest.c ssltestlib.c
267 INCLUDE[asynciotest]=../include
268 DEPEND[asynciotest]=../libcrypto ../libssl
270 SOURCE[bioprinttest]=bioprinttest.c
271 INCLUDE[bioprinttest]=../include
272 DEPEND[bioprinttest]=../libcrypto
274 SOURCE[sslapitest]=sslapitest.c ssltestlib.c testutil.c test_main_custom.c
275 INCLUDE[sslapitest]=../include ..
276 DEPEND[sslapitest]=../libcrypto ../libssl
278 SOURCE[dtlstest]=dtlstest.c ssltestlib.c testutil.c test_main_custom.c
279 INCLUDE[dtlstest]=../include .
280 DEPEND[dtlstest]=../libcrypto ../libssl
282 SOURCE[sslcorrupttest]=sslcorrupttest.c ssltestlib.c testutil.c
283 INCLUDE[sslcorrupttest]=../include .
284 DEPEND[sslcorrupttest]=../libcrypto ../libssl
286 SOURCE[bio_enc_test]=bio_enc_test.c
287 INCLUDE[bio_enc_test]=../include
288 DEPEND[bio_enc_test]=../libcrypto
290 SOURCE[pkey_meth_test]=pkey_meth_test.c testutil.c test_main.c
291 INCLUDE[pkey_meth_test]=../include
292 DEPEND[pkey_meth_test]=../libcrypto
294 SOURCE[x509_time_test]=x509_time_test.c testutil.c test_main.c
295 INCLUDE[x509_time_test]=.. ../include
296 DEPEND[x509_time_test]=../libcrypto
298 SOURCE[recordlentest]=recordlentest.c ssltestlib.c testutil.c test_main_custom.c
299 INCLUDE[recordlentest]=../include .
300 DEPEND[recordlentest]=../libcrypto ../libssl
302 IF[{- !$disabled{psk} -}]
303 PROGRAMS_NO_INST=dtls_mtu_test
304 SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
305 INCLUDE[dtls_mtu_test]=.. ../include
306 DEPEND[dtls_mtu_test]=../libcrypto ../libssl
309 IF[{- !$disabled{shared} -}]
310 PROGRAMS_NO_INST=shlibloadtest
311 SOURCE[shlibloadtest]=shlibloadtest.c
312 INCLUDE[shlibloadtest]=../include
315 IF[{- $disabled{shared} -}]
316 PROGRAMS_NO_INST=cipher_overhead_test
317 SOURCE[cipher_overhead_test]=cipher_overhead_test.c
318 INCLUDE[cipher_overhead_test]=.. ../include
319 DEPEND[cipher_overhead_test]=../libcrypto ../libssl
322 SOURCE[uitest]=uitest.c testutil.c test_main_custom.c \
323 ../apps/apps.c ../apps/opt.c {- $apps_extra -}
324 INCLUDE[uitest]=.. ../include
325 DEPEND[uitest]=../libcrypto ../libssl
327 SOURCE[cipherbytes_test]=cipherbytes_test.c
328 INCLUDE[cipherbytes_test]=.. ../include
329 DEPEND[cipherbytes_test]=../libcrypto ../libssl
331 # Internal test programs. These are essentially a collection of internal
332 # test routines. Some of them need to reach internal symbols that aren't
333 # available through the shared library (at least on Linux, Solaris, Windows
334 # and VMS, where the exported symbols are those listed in util/*.num), these
335 # programs are forcebly linked with the static libraries, where all symbols
336 # are always available. This excludes linking these programs natively on
337 # Windows when building shared libraries, since the static libraries share
338 # names with the DLL import libraries.
339 IF[{- $disabled{shared} || $target{build_scheme}->[1] ne 'windows' -}]
340 PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test \
341 tls13encryptiontest wpackettest
342 IF[{- !$disabled{poly1305} -}]
343 PROGRAMS_NO_INST=poly1305_internal_test
345 IF[{- !$disabled{chacha} -}]
346 PROGRAMS_NO_INST=chacha_internal_test
348 IF[{- !$disabled{siphash} -}]
349 PROGRAMS_NO_INST=siphash_internal_test
352 SOURCE[poly1305_internal_test]=poly1305_internal_test.c testutil.c test_main_custom.c
353 INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include
354 DEPEND[poly1305_internal_test]=../libcrypto.a
356 SOURCE[chacha_internal_test]=chacha_internal_test.c
357 INCLUDE[chacha_internal_test]=.. ../include ../crypto/include
358 DEPEND[chacha_internal_test]=../libcrypto.a
360 SOURCE[asn1_internal_test]=asn1_internal_test.c testutil.c test_main.c
361 INCLUDE[asn1_internal_test]=.. ../include ../crypto/include
362 DEPEND[asn1_internal_test]=../libcrypto.a
364 SOURCE[modes_internal_test]=modes_internal_test.c testutil.c test_main_custom.c
365 INCLUDE[modes_internal_test]=.. ../include
366 DEPEND[modes_internal_test]=../libcrypto.a
368 SOURCE[x509_internal_test]=x509_internal_test.c testutil.c test_main.c
369 INCLUDE[x509_internal_test]=.. ../include
370 DEPEND[x509_internal_test]=../libcrypto.a
372 SOURCE[tls13encryptiontest]=tls13encryptiontest.c testutil.c test_main.c
373 INCLUDE[tls13encryptiontest]=.. ../include
374 DEPEND[tls13encryptiontest]=../libcrypto ../libssl.a
376 SOURCE[wpackettest]=wpackettest.c testutil.c test_main_custom.c
377 INCLUDE[wpackettest]=../include
378 DEPEND[wpackettest]=../libcrypto ../libssl.a
380 SOURCE[siphash_internal_test]=siphash_internal_test.c testutil.c test_main_custom.c
381 INCLUDE[siphash_internal_test]=.. ../include ../crypto/include
382 DEPEND[siphash_internal_test]=../libcrypto.a
385 IF[{- !$disabled{mdc2} -}]
386 PROGRAMS_NO_INST=mdc2_internal_test
389 SOURCE[mdc2_internal_test]=mdc2_internal_test.c testutil.c test_main.c
390 INCLUDE[mdc2_internal_test]=.. ../include
391 DEPEND[mdc2_internal_test]=../libcrypto
393 # We disable this test completely in a shared build because it deliberately
394 # redefines some internal libssl symbols. This doesn't work in a non-shared
396 IF[{- !$disabled{shared} -}]
397 PROGRAMS_NO_INST=tls13secretstest
398 SOURCE[tls13secretstest]=tls13secretstest.c testutil.c test_main.c
399 SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
400 INCLUDE[tls13secretstest]=.. ../include
401 DEPEND[tls13secretstest]=../libcrypto ../libssl
406 use File::Spec::Functions;
408 use if $^O ne "VMS", 'File::Glob' => qw/glob/;
410 my @nogo_headers = ( "asn1_mac.h",
411 "__decc_include_prologue.h",
412 "__decc_include_epilogue.h" );
413 my @headerfiles = glob catfile($sourcedir,
414 updir(), "include", "openssl", "*.h");
416 foreach my $headerfile (@headerfiles) {
417 my $name = basename($headerfile, ".h");
418 next if $disabled{$name};
419 next if grep { $_ eq lc("$name.h") } @nogo_headers;
422 PROGRAMS_NO_INST=buildtest_$name
423 GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
424 SOURCE[buildtest_$name]=buildtest_$name.c
425 INCLUDE[buildtest_$name]=../include
426 DEPEND[buildtest_$name]=../libssl ../libcrypto