Configurations/unix-Makefile.tmpl: make cleanup kinder
[openssl.git] / test / build.info
1 SUBDIRS=ossl_shim
2
3 # TODO: use ../apps/libapps.a instead of direct ../apps/lib source.
4 # This can't currently be done, because some of its units drag in too many
5 # unresolved references that don't apply here.
6 # Most of all, ../apps/lib/apps.c needs to be divided in smaller pieces to
7 # be useful here.
8 #
9 # Auxiliary program source (copied from ../apps/build.info)
10 IF[{- $config{target} =~ /^(?:VC-|mingw)/ -}]
11   # It's called 'init', but doesn't have much 'init' in it...
12   $AUXLIBAPPSSRC=../apps/lib/win32_init.c
13 ENDIF
14 IF[{- $config{target} =~ /^vms-/ -}]
15   $AUXLIBAPPSSRC=../apps/lib/vms_term_sock.c ../apps/lib/vms_decc_argv.c
16 ENDIF
17 $LIBAPPSSRC=../apps/lib/opt.c $AUXLIBAPPSSRC
18
19 IF[{- !$disabled{tests} -}]
20   LIBS{noinst,has_main}=libtestutil.a
21   SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output_helpers.c \
22           testutil/driver.c testutil/tests.c testutil/cb.c testutil/stanza.c \
23           testutil/format_output.c \
24           testutil/test_cleanup.c testutil/main.c testutil/testutil_init.c \
25           testutil/options.c testutil/test_options.c testutil/provider.c \
26           testutil/apps_mem.c testutil/random.c $LIBAPPSSRC
27   INCLUDE[libtestutil.a]=../include ../apps/include ..
28   DEPEND[libtestutil.a]=../libcrypto
29
30   PROGRAMS{noinst}= \
31           confdump \
32           versions \
33           aborttest test_test pkcs12_format_test \
34           sanitytest rsa_complex exdatatest bntest \
35           ectest ecstresstest gmdifftest pbelutest \
36           destest mdc2test \
37           exptest \
38           evp_pkey_provided_test evp_test evp_extra_test evp_extra_test2 \
39           evp_fetch_prov_test acvp_test evp_libctx_test ossl_store_test \
40           v3nametest v3ext \
41           evp_pkey_provided_test evp_test evp_extra_test evp_extra_test2 \
42           evp_fetch_prov_test v3nametest v3ext \
43           crltest danetest bad_dtls_test lhash_test sparse_array_test \
44           conf_include_test params_api_test params_conversion_test \
45           constant_time_test verify_extra_test clienthellotest \
46           packettest asynctest secmemtest srptest memleaktest stack_test \
47           dtlsv1listentest ct_test threadstest afalgtest d2i_test \
48           ssl_test_ctx_test ssl_test x509aux cipherlist_test asynciotest \
49           bio_callback_test bio_memleak_test param_build_test \
50           bioprinttest sslapitest dtlstest sslcorrupttest \
51           bio_enc_test pkey_meth_test pkey_meth_kdf_test evp_kdf_test uitest \
52           cipherbytes_test \
53           asn1_encode_test asn1_decode_test asn1_string_table_test \
54           x509_time_test x509_dup_cert_test x509_check_cert_pkey_test \
55           recordlentest drbgtest rand_status_test sslbuffertest \
56           time_offset_test pemtest ssl_cert_table_internal_test ciphername_test \
57           http_test servername_test ocspapitest fatalerrtest tls13ccstest \
58           sysdefaulttest errtest ssl_ctx_test gosttest \
59           context_internal_test aesgcmtest params_test evp_pkey_dparams_test \
60           keymgmt_internal_test hexstr_test provider_status_test defltfips_test
61
62   IF[{- !$disabled{'deprecated-3.0'} -}]
63     PROGRAMS{noinst}=enginetest
64   ENDIF
65
66   SOURCE[confdump]=confdump.c
67   INCLUDE[confdump]=../include ../apps/include
68   DEPEND[confdump]=../libcrypto
69
70   SOURCE[versions]=versions.c
71   INCLUDE[versions]=../include ../apps/include
72   DEPEND[versions]=../libcrypto
73
74   SOURCE[aborttest]=aborttest.c
75   INCLUDE[aborttest]=../include ../apps/include
76   DEPEND[aborttest]=../libcrypto
77
78   SOURCE[sanitytest]=sanitytest.c
79   INCLUDE[sanitytest]=../include ../apps/include
80   DEPEND[sanitytest]=../libcrypto libtestutil.a
81
82   SOURCE[rsa_complex]=rsa_complex.c
83   INCLUDE[rsa_complex]=../include ../apps/include
84
85   SOURCE[test_test]=test_test.c
86   INCLUDE[test_test]=../include ../apps/include
87   DEPEND[test_test]=../libcrypto libtestutil.a
88
89   SOURCE[exdatatest]=exdatatest.c
90   INCLUDE[exdatatest]=../include ../apps/include
91   DEPEND[exdatatest]=../libcrypto libtestutil.a
92
93   SOURCE[bntest]=bntest.c
94   INCLUDE[bntest]=../include ../apps/include
95   DEPEND[bntest]=../libcrypto libtestutil.a
96
97   SOURCE[ectest]=ectest.c
98   INCLUDE[ectest]=../include ../apps/include
99   DEPEND[ectest]=../libcrypto libtestutil.a
100
101   SOURCE[ecstresstest]=ecstresstest.c
102   INCLUDE[ecstresstest]=../include ../apps/include
103   DEPEND[ecstresstest]=../libcrypto libtestutil.a
104
105   SOURCE[gmdifftest]=gmdifftest.c
106   INCLUDE[gmdifftest]=../include ../apps/include
107   DEPEND[gmdifftest]=../libcrypto libtestutil.a
108
109   SOURCE[pbelutest]=pbelutest.c
110   INCLUDE[pbelutest]=../include ../apps/include
111   DEPEND[pbelutest]=../libcrypto libtestutil.a
112
113   SOURCE[mdc2test]=mdc2test.c
114   INCLUDE[mdc2test]=../include ../apps/include
115   DEPEND[mdc2test]=../libcrypto libtestutil.a
116
117   SOURCE[enginetest]=enginetest.c
118   INCLUDE[enginetest]=../include ../apps/include
119   DEPEND[enginetest]=../libcrypto libtestutil.a
120
121   SOURCE[exptest]=exptest.c
122   INCLUDE[exptest]=../include ../apps/include
123   DEPEND[exptest]=../libcrypto libtestutil.a
124
125   SOURCE[fatalerrtest]=fatalerrtest.c ssltestlib.c
126   INCLUDE[fatalerrtest]=../include ../apps/include
127   DEPEND[fatalerrtest]=../libcrypto ../libssl libtestutil.a
128
129   SOURCE[tls13ccstest]=tls13ccstest.c ssltestlib.c
130   INCLUDE[tls13ccstest]=../include ../apps/include
131   DEPEND[tls13ccstest]=../libcrypto ../libssl libtestutil.a
132
133   SOURCE[evp_test]=evp_test.c
134   INCLUDE[evp_test]=../include ../apps/include
135   DEPEND[evp_test]=../libcrypto libtestutil.a
136   IF[{- $disabled{legacy} || !$target{dso_scheme} -}]
137     DEFINE[evp_test]=NO_LEGACY_MODULE
138   ENDIF
139
140   SOURCE[evp_extra_test]=evp_extra_test.c
141   INCLUDE[evp_extra_test]=../include ../apps/include
142   DEPEND[evp_extra_test]=../libcrypto.a libtestutil.a
143
144   SOURCE[evp_extra_test2]=evp_extra_test2.c
145   INCLUDE[evp_extra_test2]=../include ../apps/include
146   DEPEND[evp_extra_test2]=../libcrypto libtestutil.a
147
148   SOURCE[evp_libctx_test]=evp_libctx_test.c
149   INCLUDE[evp_libctx_test]=../include ../apps/include
150   DEPEND[evp_libctx_test]=../libcrypto.a libtestutil.a
151
152   SOURCE[evp_fetch_prov_test]=evp_fetch_prov_test.c
153   INCLUDE[evp_fetch_prov_test]=../include ../apps/include
154   DEPEND[evp_fetch_prov_test]=../libcrypto libtestutil.a
155   IF[{- $disabled{fips} || !$target{dso_scheme} -}]
156     DEFINE[evp_extra_test]=NO_FIPS_MODULE
157   ENDIF
158
159   SOURCE[evp_pkey_provided_test]=evp_pkey_provided_test.c
160   INCLUDE[evp_pkey_provided_test]=../include ../apps/include
161   DEPEND[evp_pkey_provided_test]=../libcrypto.a libtestutil.a
162
163   IF[{- !$disabled{acvp-tests} -}]
164     SOURCE[acvp_test]=acvp_test.c
165     INCLUDE[acvp_test]=../include ../apps/include
166     DEPEND[acvp_test]=../libcrypto.a libtestutil.a
167   ENDIF
168
169   SOURCE[ossl_store_test]=ossl_store_test.c
170   INCLUDE[ossl_store_test]=../include ../apps/include
171   DEPEND[ossl_store_test]=../libcrypto.a libtestutil.a
172
173   SOURCE[provider_status_test]=provider_status_test.c
174   INCLUDE[provider_status_test]=../include ../apps/include
175   DEPEND[provider_status_test]=../libcrypto.a libtestutil.a
176
177   IF[{- !$disabled{'deprecated-3.0'} -}]
178     PROGRAMS{noinst}=igetest bftest casttest
179
180     SOURCE[igetest]=igetest.c
181     INCLUDE[igetest]=../include ../apps/include
182     DEPEND[igetest]=../libcrypto libtestutil.a
183
184     SOURCE[bftest]=bftest.c
185     INCLUDE[bftest]=../include ../apps/include
186     DEPEND[bftest]=../libcrypto libtestutil.a
187
188     SOURCE[casttest]=casttest.c
189     INCLUDE[casttest]=../include ../apps/include
190     DEPEND[casttest]=../libcrypto libtestutil.a
191   ENDIF
192
193   SOURCE[v3nametest]=v3nametest.c
194   INCLUDE[v3nametest]=../include ../apps/include
195   DEPEND[v3nametest]=../libcrypto libtestutil.a
196
197   SOURCE[crltest]=crltest.c
198   INCLUDE[crltest]=../include ../apps/include
199   DEPEND[crltest]=../libcrypto libtestutil.a
200
201   SOURCE[v3ext]=v3ext.c
202   INCLUDE[v3ext]=../include ../apps/include
203   DEPEND[v3ext]=../libcrypto libtestutil.a
204
205   SOURCE[danetest]=danetest.c
206   INCLUDE[danetest]=../include ../apps/include
207   DEPEND[danetest]=../libcrypto ../libssl libtestutil.a
208
209   SOURCE[constant_time_test]=constant_time_test.c
210   INCLUDE[constant_time_test]=../include ../apps/include
211   DEPEND[constant_time_test]=../libcrypto libtestutil.a
212
213   SOURCE[verify_extra_test]=verify_extra_test.c
214   INCLUDE[verify_extra_test]=../include ../apps/include
215   DEPEND[verify_extra_test]=../libcrypto libtestutil.a
216
217   SOURCE[clienthellotest]=clienthellotest.c
218   INCLUDE[clienthellotest]=../include ../apps/include
219   DEPEND[clienthellotest]=../libcrypto ../libssl libtestutil.a
220
221   SOURCE[bad_dtls_test]=bad_dtls_test.c
222   INCLUDE[bad_dtls_test]=../include ../apps/include
223   DEPEND[bad_dtls_test]=../libcrypto ../libssl libtestutil.a
224
225   SOURCE[packettest]=packettest.c
226   INCLUDE[packettest]=../include ../apps/include
227   DEPEND[packettest]=../libcrypto libtestutil.a
228
229   SOURCE[asynctest]=asynctest.c
230   INCLUDE[asynctest]=../include ../apps/include
231   DEPEND[asynctest]=../libcrypto
232
233   SOURCE[secmemtest]=secmemtest.c
234   INCLUDE[secmemtest]=../include ../apps/include
235   DEPEND[secmemtest]=../libcrypto libtestutil.a
236
237   SOURCE[srptest]=srptest.c
238   INCLUDE[srptest]=../include ../apps/include
239   DEPEND[srptest]=../libcrypto libtestutil.a
240
241   SOURCE[memleaktest]=memleaktest.c
242   INCLUDE[memleaktest]=../include ../apps/include
243   DEPEND[memleaktest]=../libcrypto libtestutil.a
244
245   SOURCE[pkcs12_format_test]=pkcs12_format_test.c pkcs12_helper.c
246   INCLUDE[pkcs12_format_test]=../include ../apps/include
247   DEPEND[pkcs12_format_test]=../libcrypto libtestutil.a
248
249   SOURCE[stack_test]=stack_test.c
250   INCLUDE[stack_test]=../include ../apps/include
251   DEPEND[stack_test]=../libcrypto libtestutil.a
252
253   SOURCE[lhash_test]=lhash_test.c
254   INCLUDE[lhash_test]=../include ../apps/include
255   DEPEND[lhash_test]=../libcrypto libtestutil.a
256
257   SOURCE[dtlsv1listentest]=dtlsv1listentest.c
258   INCLUDE[dtlsv1listentest]=../include ../apps/include
259   DEPEND[dtlsv1listentest]=../libssl libtestutil.a
260
261   SOURCE[ct_test]=ct_test.c
262   INCLUDE[ct_test]=../include ../apps/include
263   DEPEND[ct_test]=../libcrypto libtestutil.a
264
265   SOURCE[threadstest]=threadstest.c
266   INCLUDE[threadstest]=../include ../apps/include
267   DEPEND[threadstest]=../libcrypto libtestutil.a
268
269   SOURCE[afalgtest]=afalgtest.c
270   INCLUDE[afalgtest]=../include ../apps/include
271   DEPEND[afalgtest]=../libcrypto libtestutil.a
272
273   SOURCE[d2i_test]=d2i_test.c
274   INCLUDE[d2i_test]=../include ../apps/include
275   DEPEND[d2i_test]=../libcrypto libtestutil.a
276
277   SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c
278   INCLUDE[ssl_test_ctx_test]=../include ../apps/include
279   DEPEND[ssl_test_ctx_test]=../libcrypto ../libssl libtestutil.a
280
281   SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c handshake_helper.c
282   INCLUDE[ssl_test]=../include ../apps/include
283   DEPEND[ssl_test]=../libcrypto ../libssl libtestutil.a
284
285   SOURCE[cipherlist_test]=cipherlist_test.c
286   INCLUDE[cipherlist_test]=../include ../apps/include
287   DEPEND[cipherlist_test]=../libcrypto ../libssl libtestutil.a
288
289   INCLUDE[ssl_test_ctx.o]=../include
290   INCLUDE[handshake_helper.o]=.. ../include
291   INCLUDE[pkcs12_helper.o]=.. ../include
292   INCLUDE[ssltestlib.o]=.. ../include
293   INCLUDE[cmp_testlib.o]=.. ../include ../apps/include
294
295   SOURCE[x509aux]=x509aux.c
296   INCLUDE[x509aux]=../include ../apps/include
297   DEPEND[x509aux]=../libcrypto libtestutil.a
298
299   SOURCE[asynciotest]=asynciotest.c ssltestlib.c
300   INCLUDE[asynciotest]=../include ../apps/include
301   DEPEND[asynciotest]=../libcrypto ../libssl libtestutil.a
302
303   SOURCE[bio_callback_test]=bio_callback_test.c
304   INCLUDE[bio_callback_test]=../include ../apps/include
305   DEPEND[bio_callback_test]=../libcrypto libtestutil.a
306
307   SOURCE[bio_memleak_test]=bio_memleak_test.c
308   INCLUDE[bio_memleak_test]=../include ../apps/include
309   DEPEND[bio_memleak_test]=../libcrypto libtestutil.a
310
311   SOURCE[bioprinttest]=bioprinttest.c
312   INCLUDE[bioprinttest]=../include ../apps/include
313   DEPEND[bioprinttest]=../libcrypto libtestutil.a
314
315   SOURCE[params_api_test]=params_api_test.c
316   INCLUDE[params_api_test]=../include ../apps/include
317   DEPEND[params_api_test]=../libcrypto libtestutil.a
318
319   SOURCE[params_conversion_test]=params_conversion_test.c
320   INCLUDE[params_conversion_test]=../include ../apps/include
321   DEPEND[params_conversion_test]=../libcrypto libtestutil.a
322
323   SOURCE[param_build_test]=param_build_test.c
324   INCLUDE[param_build_test]=../include ../apps/include
325   DEPEND[param_build_test]=../libcrypto.a libtestutil.a
326
327   SOURCE[sslapitest]=sslapitest.c ssltestlib.c filterprov.c tls-provider.c
328   INCLUDE[sslapitest]=../include ../apps/include ..
329   DEPEND[sslapitest]=../libcrypto ../libssl libtestutil.a
330
331   SOURCE[defltfips_test]=defltfips_test.c
332   INCLUDE[defltfips_test]=../include  ../apps/include
333   DEPEND[defltfips_test]=../libcrypto libtestutil.a
334
335   SOURCE[ocspapitest]=ocspapitest.c
336   INCLUDE[ocspapitest]=../include ../apps/include
337   DEPEND[ocspapitest]=../libcrypto libtestutil.a
338
339   IF[{- !$disabled{sock} -}]
340     PROGRAMS{noinst}=http_test
341   ENDIF
342
343   SOURCE[http_test]=http_test.c
344   INCLUDE[http_test]=../include ../apps/include
345   DEPEND[http_test]=../libcrypto libtestutil.a
346
347   SOURCE[dtlstest]=dtlstest.c ssltestlib.c
348   INCLUDE[dtlstest]=../include ../apps/include
349   DEPEND[dtlstest]=../libcrypto ../libssl libtestutil.a
350
351   SOURCE[sslcorrupttest]=sslcorrupttest.c ssltestlib.c
352   INCLUDE[sslcorrupttest]=../include ../apps/include
353   DEPEND[sslcorrupttest]=../libcrypto ../libssl libtestutil.a
354
355   SOURCE[bio_enc_test]=bio_enc_test.c
356   INCLUDE[bio_enc_test]=../include ../apps/include
357   DEPEND[bio_enc_test]=../libcrypto libtestutil.a
358
359   SOURCE[pkey_meth_test]=pkey_meth_test.c
360   INCLUDE[pkey_meth_test]=../include ../apps/include
361   DEPEND[pkey_meth_test]=../libcrypto libtestutil.a
362
363   SOURCE[pkey_meth_kdf_test]=pkey_meth_kdf_test.c
364   INCLUDE[pkey_meth_kdf_test]=../include ../apps/include
365   DEPEND[pkey_meth_kdf_test]=../libcrypto libtestutil.a
366
367   SOURCE[evp_kdf_test]=evp_kdf_test.c
368   INCLUDE[evp_kdf_test]=../include ../apps/include
369   DEPEND[evp_kdf_test]=../libcrypto libtestutil.a
370
371   SOURCE[evp_pkey_dparams_test]=evp_pkey_dparams_test.c
372   INCLUDE[evp_pkey_dparams_test]=../include ../apps/include
373   DEPEND[evp_pkey_dparams_test]=../libcrypto libtestutil.a
374
375   SOURCE[x509_time_test]=x509_time_test.c
376   INCLUDE[x509_time_test]=../include ../apps/include
377   DEPEND[x509_time_test]=../libcrypto libtestutil.a
378
379   SOURCE[recordlentest]=recordlentest.c ssltestlib.c
380   INCLUDE[recordlentest]=../include ../apps/include
381   DEPEND[recordlentest]=../libcrypto ../libssl libtestutil.a
382
383   SOURCE[drbgtest]=drbgtest.c
384   INCLUDE[drbgtest]=../include ../apps/include
385   DEPEND[drbgtest]=../libcrypto.a libtestutil.a
386
387   SOURCE[rand_status_test]=rand_status_test.c
388   INCLUDE[rand_status_test]=../include ../apps/include
389   DEPEND[rand_status_test]=../libcrypto libtestutil.a
390
391   SOURCE[x509_dup_cert_test]=x509_dup_cert_test.c
392   INCLUDE[x509_dup_cert_test]=../include ../apps/include
393   DEPEND[x509_dup_cert_test]=../libcrypto libtestutil.a
394
395   SOURCE[x509_check_cert_pkey_test]=x509_check_cert_pkey_test.c
396   INCLUDE[x509_check_cert_pkey_test]=../include ../apps/include
397   DEPEND[x509_check_cert_pkey_test]=../libcrypto libtestutil.a
398
399   SOURCE[pemtest]=pemtest.c
400   INCLUDE[pemtest]=../include ../apps/include
401   DEPEND[pemtest]=../libcrypto libtestutil.a
402
403   SOURCE[ssl_cert_table_internal_test]=ssl_cert_table_internal_test.c
404   INCLUDE[ssl_cert_table_internal_test]=.. ../include ../apps/include
405   DEPEND[ssl_cert_table_internal_test]=../libcrypto libtestutil.a
406
407   SOURCE[ciphername_test]=ciphername_test.c
408   INCLUDE[ciphername_test]=../include ../apps/include
409   DEPEND[ciphername_test]=../libcrypto ../libssl libtestutil.a
410
411   SOURCE[http_test]=http_test.c
412   INCLUDE[http_test]=../include ../apps/include
413   DEPEND[http_test]=../libcrypto libtestutil.a
414
415   SOURCE[servername_test]=servername_test.c ssltestlib.c
416   INCLUDE[servername_test]=../include ../apps/include
417   DEPEND[servername_test]=../libcrypto ../libssl libtestutil.a
418
419   IF[{- !$disabled{cms} -}]
420     PROGRAMS{noinst}=cmsapitest
421     SOURCE[cmsapitest]=cmsapitest.c
422     INCLUDE[cmsapitest]=../include ../apps/include
423     DEPEND[cmsapitest]=../libcrypto libtestutil.a
424   ENDIF
425
426   IF[{- !$disabled{psk} -}]
427     PROGRAMS{noinst}=dtls_mtu_test
428     SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
429     INCLUDE[dtls_mtu_test]=.. ../include ../apps/include
430     DEPEND[dtls_mtu_test]=../libcrypto ../libssl libtestutil.a
431   ENDIF
432
433   IF[{- !$disabled{shared} -}]
434     PROGRAMS{noinst}=shlibloadtest
435     SOURCE[shlibloadtest]=shlibloadtest.c
436     INCLUDE[shlibloadtest]=../include ../apps/include
437   ENDIF
438
439   # cipher_overhead_test uses internal symbols, so it must be linked with
440   # the static libraries
441   PROGRAMS{noinst}=cipher_overhead_test
442   SOURCE[cipher_overhead_test]=cipher_overhead_test.c
443   INCLUDE[cipher_overhead_test]=.. ../include ../apps/include
444   DEPEND[cipher_overhead_test]=../libcrypto.a ../libssl.a libtestutil.a
445
446   SOURCE[uitest]=uitest.c ../apps/lib/apps_ui.c
447   INCLUDE[uitest]=.. ../include ../apps/include
448   DEPEND[uitest]=../libcrypto ../libssl libtestutil.a
449
450   SOURCE[cipherbytes_test]=cipherbytes_test.c
451   INCLUDE[cipherbytes_test]=../include ../apps/include
452   DEPEND[cipherbytes_test]=../libcrypto ../libssl libtestutil.a
453
454   SOURCE[asn1_encode_test]=asn1_encode_test.c
455   INCLUDE[asn1_encode_test]=../include ../apps/include
456   DEPEND[asn1_encode_test]=../libcrypto libtestutil.a
457
458   SOURCE[asn1_decode_test]=asn1_decode_test.c
459   INCLUDE[asn1_decode_test]=../include ../apps/include
460   DEPEND[asn1_decode_test]=../libcrypto libtestutil.a
461
462   SOURCE[asn1_string_table_test]=asn1_string_table_test.c
463   INCLUDE[asn1_string_table_test]=../include ../apps/include
464   DEPEND[asn1_string_table_test]=../libcrypto libtestutil.a
465
466   SOURCE[time_offset_test]=time_offset_test.c
467   INCLUDE[time_offset_test]=../include ../apps/include
468   DEPEND[time_offset_test]=../libcrypto libtestutil.a
469
470   SOURCE[conf_include_test]=conf_include_test.c
471   INCLUDE[conf_include_test]=../include ../apps/include
472   DEPEND[conf_include_test]=../libcrypto libtestutil.a
473
474   IF[{- !$disabled{cmp} -}]
475     PROGRAMS{noinst}=cmp_asn_test cmp_ctx_test cmp_status_test cmp_hdr_test \
476                      cmp_protect_test cmp_msg_test cmp_vfy_test \
477                      cmp_server_test cmp_client_test
478   ENDIF
479
480   SOURCE[cmp_asn_test]=cmp_asn_test.c cmp_testlib.c
481   INCLUDE[cmp_asn_test]=.. ../include ../apps/include
482   DEPEND[cmp_asn_test]=../libcrypto.a libtestutil.a
483
484   SOURCE[cmp_ctx_test]=cmp_ctx_test.c cmp_testlib.c
485   INCLUDE[cmp_ctx_test]=.. ../include ../apps/include
486   DEPEND[cmp_ctx_test]=../libcrypto.a libtestutil.a
487
488   SOURCE[cmp_hdr_test]=cmp_hdr_test.c cmp_testlib.c
489   INCLUDE[cmp_hdr_test]=.. ../include ../apps/include
490   DEPEND[cmp_hdr_test]=../libcrypto.a libtestutil.a
491
492   SOURCE[cmp_status_test]=cmp_status_test.c cmp_testlib.c
493   INCLUDE[cmp_status_test]=.. ../include ../apps/include
494   DEPEND[cmp_status_test]=../libcrypto.a libtestutil.a
495
496   SOURCE[cmp_protect_test]=cmp_protect_test.c cmp_testlib.c
497   INCLUDE[cmp_protect_test]=.. ../include ../apps/include
498   DEPEND[cmp_protect_test]=../libcrypto.a libtestutil.a
499
500   SOURCE[cmp_msg_test]=cmp_msg_test.c cmp_testlib.c
501   INCLUDE[cmp_msg_test]=.. ../include ../apps/include
502   DEPEND[cmp_msg_test]=../libcrypto.a libtestutil.a
503
504   SOURCE[cmp_vfy_test]=cmp_vfy_test.c cmp_testlib.c
505   INCLUDE[cmp_vfy_test]=.. ../include ../apps/include
506   DEPEND[cmp_vfy_test]=../libcrypto.a libtestutil.a
507
508   SOURCE[cmp_server_test]=cmp_server_test.c cmp_testlib.c
509   INCLUDE[cmp_server_test]=.. ../include ../apps/include
510   DEPEND[cmp_server_test]=../libcrypto.a libtestutil.a
511
512   SOURCE[cmp_client_test]=cmp_client_test.c cmp_testlib.c ../apps/cmp_mock_srv.c
513   INCLUDE[cmp_client_test]=.. ../include ../apps/include
514   DEPEND[cmp_client_test]=../libcrypto.a libtestutil.a
515
516   # Internal test programs.  These are essentially a collection of internal
517   # test routines.  Some of them need to reach internal symbols that aren't
518   # available through the shared library (at least on Linux, Solaris, Windows
519   # and VMS, where the exported symbols are those listed in util/*.num), these
520   # programs are forcibly linked with the static libraries, where all symbols
521   # are always available.
522   IF[1]
523     PROGRAMS{noinst}=asn1_internal_test modes_internal_test x509_internal_test \
524                      tls13encryptiontest wpackettest ctype_internal_test \
525                      rdrand_sanitytest property_test ideatest rsa_mp_test \
526                      rsa_sp800_56b_test bn_internal_test ecdsatest rsa_test \
527                      rc2test rc4test rc5test hmactest ffc_internal_test \
528                      asn1_dsa_internal_test dsatest dsa_no_digest_size_test \
529                      dhtest ssltest_old
530
531     IF[{- !$disabled{poly1305} -}]
532       PROGRAMS{noinst}=poly1305_internal_test
533     ENDIF
534     IF[{- !$disabled{chacha} -}]
535       PROGRAMS{noinst}=chacha_internal_test
536     ENDIF
537     IF[{- !$disabled{siphash} -}]
538       PROGRAMS{noinst}=siphash_internal_test
539     ENDIF
540     IF[{- !$disabled{sm2} -}]
541       PROGRAMS{noinst}=sm2_internal_test
542     ENDIF
543     IF[{- !$disabled{sm4} -}]
544       PROGRAMS{noinst}=sm4_internal_test
545     ENDIF
546     IF[{- !$disabled{ec} -}]
547       PROGRAMS{noinst}=ec_internal_test curve448_internal_test
548     ENDIF
549     IF[{- !$disabled{cmac} -}]
550       PROGRAMS{noinst}=cmactest
551     ENDIF
552
553     SOURCE[poly1305_internal_test]=poly1305_internal_test.c
554     INCLUDE[poly1305_internal_test]=.. ../include ../apps/include
555     DEPEND[poly1305_internal_test]=../libcrypto.a libtestutil.a
556
557     SOURCE[chacha_internal_test]=chacha_internal_test.c
558     INCLUDE[chacha_internal_test]=.. ../include ../apps/include
559     DEPEND[chacha_internal_test]=../libcrypto.a libtestutil.a
560
561     SOURCE[asn1_internal_test]=asn1_internal_test.c
562     INCLUDE[asn1_internal_test]=.. ../include ../apps/include
563     DEPEND[asn1_internal_test]=../libcrypto.a libtestutil.a
564
565     SOURCE[modes_internal_test]=modes_internal_test.c
566     INCLUDE[modes_internal_test]=.. ../include ../apps/include
567     DEPEND[modes_internal_test]=../libcrypto.a libtestutil.a
568
569     SOURCE[x509_internal_test]=x509_internal_test.c
570     INCLUDE[x509_internal_test]=.. ../include ../apps/include
571     DEPEND[x509_internal_test]=../libcrypto.a libtestutil.a
572
573     SOURCE[rsa_test]=rsa_test.c
574     INCLUDE[rsa_test]=../include ../apps/include
575     DEPEND[rsa_test]=../libcrypto.a libtestutil.a
576
577     SOURCE[rsa_mp_test]=rsa_mp_test.c
578     INCLUDE[rsa_mp_test]=../include ../apps/include
579     DEPEND[rsa_mp_test]=../libcrypto.a libtestutil.a
580
581     SOURCE[ecdsatest]=ecdsatest.c
582     INCLUDE[ecdsatest]=../include ../apps/include
583     DEPEND[ecdsatest]=../libcrypto.a libtestutil.a
584
585     SOURCE[dsatest]=dsatest.c
586     INCLUDE[dsatest]=../include ../apps/include
587     DEPEND[dsatest]=../libcrypto.a libtestutil.a
588
589     SOURCE[dsa_no_digest_size_test]=dsa_no_digest_size_test.c
590     INCLUDE[dsa_no_digest_size_test]=../include ../apps/include
591     DEPEND[dsa_no_digest_size_test]=../libcrypto.a libtestutil.a
592
593     SOURCE[tls13encryptiontest]=tls13encryptiontest.c
594     INCLUDE[tls13encryptiontest]=.. ../include ../apps/include
595     DEPEND[tls13encryptiontest]=../libcrypto ../libssl.a libtestutil.a
596
597     SOURCE[ideatest]=ideatest.c
598     INCLUDE[ideatest]=../include ../apps/include
599     DEPEND[ideatest]=../libcrypto.a libtestutil.a
600
601     SOURCE[wpackettest]=wpackettest.c
602     INCLUDE[wpackettest]=../include ../apps/include
603     DEPEND[wpackettest]=../libcrypto ../libssl.a libtestutil.a
604
605     SOURCE[property_test]=property_test.c
606     INCLUDE[property_test]=.. ../include ../apps/include
607     DEPEND[property_test]=../libcrypto.a libtestutil.a
608
609     SOURCE[ctype_internal_test]=ctype_internal_test.c
610     INCLUDE[ctype_internal_test]=.. ../include ../apps/include
611     DEPEND[ctype_internal_test]=../libcrypto.a libtestutil.a
612
613     SOURCE[sparse_array_test]=sparse_array_test.c
614     INCLUDE[sparse_array_test]=../include ../apps/include
615     DEPEND[sparse_array_test]=../libcrypto.a libtestutil.a
616
617     SOURCE[dhtest]=dhtest.c
618     INCLUDE[dhtest]=../include ../apps/include
619     DEPEND[dhtest]=../libcrypto.a libtestutil.a
620
621     SOURCE[hmactest]=hmactest.c
622     INCLUDE[hmactest]=../include ../apps/include
623     DEPEND[hmactest]=../libcrypto.a libtestutil.a
624
625     IF[{- !$disabled{cmac} -}]
626       SOURCE[cmactest]=cmactest.c
627       INCLUDE[cmactest]=../include ../apps/include
628       DEPEND[cmactest]=../libcrypto.a libtestutil.a
629     ENDIF
630
631     SOURCE[siphash_internal_test]=siphash_internal_test.c
632     INCLUDE[siphash_internal_test]=.. ../include ../apps/include
633     DEPEND[siphash_internal_test]=../libcrypto.a libtestutil.a
634
635     SOURCE[sm2_internal_test]=sm2_internal_test.c
636     INCLUDE[sm2_internal_test]=../include ../apps/include
637     DEPEND[sm2_internal_test]=../libcrypto.a libtestutil.a
638
639     SOURCE[sm4_internal_test]=sm4_internal_test.c
640     INCLUDE[sm4_internal_test]=.. ../include ../apps/include
641     DEPEND[sm4_internal_test]=../libcrypto.a libtestutil.a
642
643     SOURCE[destest]=destest.c
644     INCLUDE[destest]=../include ../apps/include
645     DEPEND[destest]=../libcrypto.a libtestutil.a
646
647     SOURCE[rc2test]=rc2test.c
648     INCLUDE[rc2test]=../include ../apps/include
649     DEPEND[rc2test]=../libcrypto.a libtestutil.a
650
651     SOURCE[rc4test]=rc4test.c
652     INCLUDE[rc4test]=../include ../apps/include
653     DEPEND[rc4test]=../libcrypto.a libtestutil.a
654
655     SOURCE[rc5test]=rc5test.c
656     INCLUDE[rc5test]=../include ../apps/include
657     DEPEND[rc5test]=../libcrypto.a libtestutil.a
658
659     SOURCE[ec_internal_test]=ec_internal_test.c
660     INCLUDE[ec_internal_test]=../include ../crypto/ec ../apps/include
661     DEPEND[ec_internal_test]=../libcrypto.a libtestutil.a
662
663     SOURCE[curve448_internal_test]=curve448_internal_test.c
664     INCLUDE[curve448_internal_test]=.. ../include ../apps/include ../crypto/ec/curve448
665     DEPEND[curve448_internal_test]=../libcrypto.a libtestutil.a
666
667     SOURCE[rc4test]=rc4test.c
668     INCLUDE[rc4test]=../include ../apps/include
669     DEPEND[rc4test]=../libcrypto.a libtestutil.a
670
671     SOURCE[rdrand_sanitytest]=rdrand_sanitytest.c
672     INCLUDE[rdrand_sanitytest]=../include ../apps/include
673     DEPEND[rdrand_sanitytest]=../libcrypto.a libtestutil.a
674
675     SOURCE[rsa_sp800_56b_test]=rsa_sp800_56b_test.c
676     INCLUDE[rsa_sp800_56b_test]=.. ../include ../crypto/rsa ../apps/include
677     DEPEND[rsa_sp800_56b_test]=../libcrypto.a libtestutil.a
678
679     SOURCE[bn_internal_test]=bn_internal_test.c
680     INCLUDE[bn_internal_test]=.. ../include ../crypto/bn ../apps/include
681     DEPEND[bn_internal_test]=../libcrypto.a libtestutil.a
682
683     SOURCE[asn1_dsa_internal_test]=asn1_dsa_internal_test.c
684     INCLUDE[asn1_dsa_internal_test]=.. ../include ../apps/include
685     DEPEND[asn1_dsa_internal_test]=../libcrypto.a libtestutil.a
686
687     SOURCE[keymgmt_internal_test]=keymgmt_internal_test.c
688     INCLUDE[keymgmt_internal_test]=.. ../include ../apps/include
689     DEPEND[keymgmt_internal_test]=../libcrypto.a libtestutil.a
690
691     SOURCE[ffc_internal_test]=ffc_internal_test.c
692     INCLUDE[ffc_internal_test]=.. ../include ../apps/include
693     DEPEND[ffc_internal_test]=../libcrypto.a libtestutil.a
694
695     IF[{- !$disabled{mdc2} -}]
696       PROGRAMS{noinst}=mdc2_internal_test
697     ENDIF
698
699     SOURCE[mdc2_internal_test]=mdc2_internal_test.c
700     INCLUDE[mdc2_internal_test]=.. ../include ../apps/include
701     DEPEND[mdc2_internal_test]=../libcrypto.a libtestutil.a
702
703     SOURCE[ssltest_old]=ssltest_old.c
704     INCLUDE[ssltest_old]=.. ../include ../apps/include
705     DEPEND[ssltest_old]=../libcrypto.a ../libssl.a
706   ENDIF
707
708   PROGRAMS{noinst}=asn1_time_test
709   SOURCE[asn1_time_test]=asn1_time_test.c
710   INCLUDE[asn1_time_test]=../include ../apps/include
711   DEPEND[asn1_time_test]=../libcrypto libtestutil.a
712
713   # We disable this test completely in a shared build because it deliberately
714   # redefines some internal libssl symbols. This doesn't work in a non-shared
715   # build
716   IF[{- !$disabled{shared} -}]
717     PROGRAMS{noinst}=tls13secretstest
718     SOURCE[tls13secretstest]=tls13secretstest.c
719     DEFINE[tls13secretstest]=OPENSSL_NO_KTLS
720     SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../crypto/packet.c
721     INCLUDE[tls13secretstest]=.. ../include ../apps/include
722     DEPEND[tls13secretstest]=../libcrypto ../libssl libtestutil.a
723   ENDIF
724
725   SOURCE[sslbuffertest]=sslbuffertest.c ssltestlib.c
726   INCLUDE[sslbuffertest]=../include ../apps/include
727   DEPEND[sslbuffertest]=../libcrypto ../libssl libtestutil.a
728
729   SOURCE[sysdefaulttest]=sysdefaulttest.c
730   INCLUDE[sysdefaulttest]=../include ../apps/include
731   DEPEND[sysdefaulttest]=../libcrypto ../libssl libtestutil.a
732
733   SOURCE[errtest]=errtest.c
734   INCLUDE[errtest]=../include ../apps/include
735   DEPEND[errtest]=../libcrypto libtestutil.a
736
737   SOURCE[gosttest]=gosttest.c ssltestlib.c
738   INCLUDE[gosttest]=../include ../apps/include ..
739   DEPEND[gosttest]=../libcrypto ../libssl libtestutil.a
740
741   SOURCE[aesgcmtest]=aesgcmtest.c
742   INCLUDE[aesgcmtest]=../include ../apps/include ..
743   DEPEND[aesgcmtest]=../libcrypto libtestutil.a
744
745   PROGRAMS{noinst}=context_internal_test
746   SOURCE[context_internal_test]=context_internal_test.c
747   INCLUDE[context_internal_test]=.. ../include ../apps/include
748   DEPEND[context_internal_test]=../libcrypto.a libtestutil.a
749
750   PROGRAMS{noinst}=provider_internal_test
751   DEFINE[provider_internal_test]=PROVIDER_INIT_FUNCTION_NAME=p_test_init
752   SOURCE[provider_internal_test]=provider_internal_test.c p_test.c
753   INCLUDE[provider_internal_test]=../include ../apps/include
754   DEPEND[provider_internal_test]=../libcrypto.a libtestutil.a
755   PROGRAMS{noinst}=provider_test
756   DEFINE[provider_test]=PROVIDER_INIT_FUNCTION_NAME=p_test_init
757   SOURCE[provider_test]=provider_test.c p_test.c
758   INCLUDE[provider_test]=../include ../apps/include
759   DEPEND[provider_test]=../libcrypto.a libtestutil.a
760   IF[{- !$disabled{module} -}]
761     MODULES{noinst}=p_test
762     SOURCE[p_test]=p_test.c
763     INCLUDE[p_test]=../include
764     IF[{- defined $target{shared_defflag} -}]
765       SOURCE[p_test]=p_test.ld
766       GENERATE[p_test.ld]=../util/providers.num
767     ENDIF
768   ENDIF
769   IF[{- $disabled{module} || !$target{dso_scheme} -}]
770     DEFINE[provider_test]=NO_PROVIDER_MODULE
771     DEFINE[provider_internal_test]=NO_PROVIDER_MODULE
772   ENDIF
773   DEPEND[]=provider_internal_test.cnf
774   GENERATE[provider_internal_test.cnf]=provider_internal_test.cnf.in
775
776   PROGRAMS{noinst}=provider_fallback_test
777   SOURCE[provider_fallback_test]=provider_fallback_test.c
778   INCLUDE[provider_fallback_test]=../include ../apps/include
779   DEPEND[provider_fallback_test]=../libcrypto libtestutil.a
780
781   PROGRAMS{noinst}=params_test
782   SOURCE[params_test]=params_test.c
783   INCLUDE[params_test]=.. ../include ../apps/include
784   DEPEND[params_test]=../libcrypto.a libtestutil.a
785
786   PROGRAMS{noinst}=hexstr_test
787   SOURCE[hexstr_test]=hexstr_test.c
788   INCLUDE[hexstr_test]=.. ../include ../apps/include
789   DEPEND[hexstr_test]=../libcrypto.a libtestutil.a
790
791   PROGRAMS{noinst}=endecode_test
792   SOURCE[endecode_test]=endecode_test.c
793   INCLUDE[endecode_test]=.. ../include ../apps/include
794   DEPEND[endecode_test]=../libcrypto.a libtestutil.a
795
796   PROGRAMS{noinst}=namemap_internal_test
797   SOURCE[namemap_internal_test]=namemap_internal_test.c
798   INCLUDE[namemap_internal_test]=.. ../include ../apps/include
799   DEPEND[namemap_internal_test]=../libcrypto.a libtestutil.a
800
801   PROGRAMS{noinst}=bio_prefix_text
802   SOURCE[bio_prefix_text]=bio_prefix_text.c $LIBAPPSSRC
803   INCLUDE[bio_prefix_text]=.. ../include ../apps/include
804   DEPEND[bio_prefix_text]=../libcrypto
805 ENDIF
806
807   SOURCE[ssl_ctx_test]=ssl_ctx_test.c
808   INCLUDE[ssl_ctx_test]=../include ../apps/include
809   DEPEND[ssl_ctx_test]=../libcrypto ../libssl libtestutil.a
810
811 {-
812    use File::Spec::Functions;
813    use File::Basename;
814    use OpenSSL::Glob;
815
816    my @nogo_headers = ( "asn1_mac.h",
817                         "opensslconf.h",
818                         "__decc_include_prologue.h",
819                         "__decc_include_epilogue.h" );
820    my @nogo_headers_re = ( qr/.*err\.h/ );
821    my @headerfiles = glob catfile($sourcedir,
822                                   updir(), "include", "openssl", "*.h");
823
824    foreach my $headerfile (@headerfiles) {
825        my $name = basename($headerfile, ".h");
826        next if $disabled{$name};
827        next if grep { $_ eq lc("$name.h") } @nogo_headers;
828        next if grep { lc("$name.h") =~ m/$_/i } @nogo_headers_re;
829        $OUT .= <<"_____";
830
831   PROGRAMS{noinst}=buildtest_c_$name
832   SOURCE[buildtest_c_$name]=buildtest_$name.c
833   GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
834   INCLUDE[buildtest_c_$name]=../include
835   DEPEND[buildtest_c_$name]=../libssl ../libcrypto
836 _____
837        $OUT .= <<"_____" if $config{CXX} && !$disabled{"buildtest-c++"};
838
839   PROGRAMS{noinst}=buildtest_cc_$name
840   SOURCE[buildtest_cc_$name]=buildtest_$name.cc
841   GENERATE[buildtest_$name.cc]=generate_buildtest.pl $name
842   INCLUDE[buildtest_cc_$name]=../include
843   DEPEND[buildtest_cc_$name]=../libssl ../libcrypto
844 _____
845    }
846 -}