Updated FIPS140 initialization and added a self test for it.
[gnutls:gnutls.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
3 #
4 # Author: Simon Josefsson
5 #
6 # This file is part of GnuTLS.
7 #
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This file is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this file; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22 SUBDIRS = . rsa-md5-collision pkcs1-padding pkcs8-decode pkcs12-decode  \
23         userid cert-tests key-id sha2 safe-renegotiation dsa scripts ecdsa \
24         slow dtls srp
25
26 if ENABLE_OPENPGP
27 SUBDIRS += openpgp-certs
28 endif
29
30 if WANT_TEST_SUITE
31 SUBDIRS += suite
32 endif
33
34 EXTRA_DIST = suppressions.valgrind eagain-common.h
35
36 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
37 AM_CPPFLAGS = \
38         -I$(top_srcdir)/gl                      \
39         -I$(top_builddir)/gl                    \
40         -I$(top_srcdir)/lib/includes            \
41         -I$(top_builddir)/lib/includes          \
42         -I$(top_srcdir)/extra/includes  \
43         -I$(top_builddir)/extra/includes        \
44         -I$(top_srcdir)/lib                     \
45         -I$(top_srcdir)/doc/examples
46
47 AM_LDFLAGS = -no-install
48 LDADD = ../lib/libgnutls.la \
49         ../gl/libgnu.la \
50         libutils.la \
51         $(LTLIBGCRYPT)  \
52         $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB)
53
54 if ENABLE_MINITASN1
55 AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1
56 endif
57
58 noinst_LTLIBRARIES = libutils.la
59 libutils_la_SOURCES = utils.h utils.c
60 libutils_la_LIBADD = ../gl/libgnu.la
61
62 ctests = simple gc set_pkcs12_cred certder certuniqueid \
63          mpi certificate_set_x509_crl dn parse_ca moredn record-sizes \
64          hostname-check cve-2008-4989 pkcs12_s2k chainverify record-sizes-range \
65          crq_key_id x509sign-verify cve-2009-1415 cve-2009-1416         \
66          crq_apis init_roundtrip pkcs12_s2k_pem dn2 mini-eagain         \
67          nul-in-x509-names x509_altname pkcs12_encode mini-x509         \
68          mini-rehandshake rng-fork mini-eagain-dtls resume-dtls \
69          x509cert x509cert-tl infoaccess mini-dtls-hello-verify \
70          mini-tdb mini-dtls-rehandshake mini-alpn mini-dtls-large \
71          mini-termination mini-x509-cas mini-x509-2 pkcs12_simple \
72          mini-emsgsize-dtls chainverify-unsorted mini-overhead \
73          mini-dtls-heartbeat mini-x509-callbacks key-openssl priorities \
74          mini-dtls-srtp mini-xssl rsa-encrypt-decrypt mini-loss-time \
75          mini-record mini-dtls-record mini-handshake-timeout mini-record-range \
76          mini-cert-status mini-rsa-psk mini-record-2
77
78 if ENABLE_FIPS140
79 ctests += fips-test
80 endif
81
82 if ENABLE_OCSP
83 ctests += ocsp
84 endif
85
86 if ENABLE_OPENSSL
87 ctests +=  openssl
88 openssl_LDADD = ../extra/libgnutls-openssl.la $(LDADD)
89 endif
90
91 mini_xssl_LDADD = $(LDADD) ../lib/libgnutls-xssl.la
92
93 if ENABLE_OPENPGP
94 ctests += openpgp-auth openpgp-auth2 openpgp-keyring pgps2kgnu
95 endif
96
97 if HAVE_FORK
98 ctests += x509self x509dn anonself pskself dhepskself   \
99         resume setcredcrash
100
101 if ENABLE_OPENPGP
102 ctests += openpgpself 
103 endif
104
105 endif
106
107 check_PROGRAMS = $(ctests)
108 dist_check_SCRIPTS = rfc2253-escape-test
109
110 TESTS = $(ctests) $(dist_check_SCRIPTS)
111
112 TESTS_ENVIRONMENT =                                             \
113         LC_ALL="C"                                              \
114         CAFILE=$(srcdir)/cert-tests/ca-certs.pem                \
115         PKCS12_MANY_CERTS_FILE=$(srcdir)/pkcs12-decode/pkcs12_5certs.p12        \
116         PKCS12FILE=$(srcdir)/pkcs12-decode/client.p12           \
117         PKCS12PASSWORD=foobar                                   \
118         PKCS12FILE_2=$(srcdir)/pkcs12-decode/pkcs12_2certs.p12  \
119         PKCS12PASSWORD_2=""                                     \
120         EXEEXT=$(EXEEXT)                                        \
121         top_builddir="$(top_builddir)"                          \
122         srcdir="$(srcdir)"
123
124 if WANT_TEST_SUITE
125 TESTS_ENVIRONMENT +=                                            \
126         $(VALGRIND)
127 endif