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