2003-07-22 Marcus Brinkmann <marcus@g10code.de>
[gpgme.git] / tests / gpgsm / Makefile.am
1 # Copyright (C) 2000 Werner Koch (dd9jn)
2 # Copyright (C) 2001 g10 Code GmbH
3
4 # This file is part of GPGME.
5
6 # GPGME is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # GPGME is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20 ## Process this file with automake to produce Makefile.in
21
22 GPGSM = @GPGSM@
23
24 TESTS_ENVIRONMENT = GNUPGHOME=.
25
26 noinst_HEADERS = t-support.h
27 TESTS = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export
28
29 EXTRA_DIST = cert_dfn_pca01.der cert_dfn_pca15.der cert_g10code_test1.der \
30         $(key_id)
31
32 INCLUDES = -I$(top_srcdir)/gpgme
33
34 AM_CPPFLAGS = @GPG_ERROR_CFLAGS@
35 LDADD = ../../gpgme/libgpgme.la @GPG_ERROR_LIBS@
36
37 # We don't run t-genkey in the test suite, because it takes too long
38 # and needs a working pinentry.
39 noinst_PROGRAMS = $(TESTS) t-genkey
40
41 key_id := 32100C27173EF6E9C4E9A25D3D69F86D37A4F939
42
43 DISTCLEANFILES = pubring.kbx pubring.kbx~ gpgsm.conf trustlist.txt \
44         private-keys-v1.d/$(key_id).key
45
46
47 all-local: ./pubring.kbx ./gpgsm.conf ./private-keys-v1.d/$(key_id).key ./trustlist.txt
48
49 ./pubring.kbx: $(srcdir)/cert_g10code_test1.der
50         $(GPGSM) --homedir . --import $(srcdir)/cert_g10code_test1.der
51
52 ./gpgsm.conf:
53         echo disable-crl-checks > ./gpgsm.conf
54         echo faked-system-time 1038908198 >> ./gpgsm.conf
55
56 ./private-keys-v1.d/$(key_id).key: $(srcdir)/$(key_id)
57         test -d ./private-keys-v1.d || mkdir ./private-keys-v1.d
58         cp $(srcdir)/$(key_id) private-keys-v1.d/$(key_id).key
59
60 ./trustlist.txt:
61         echo $(key_id) > ./trustlist.txt
62         echo >> ./trustlist.txt
63         echo "# CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE" >> ./trustlist.txt
64         echo "3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E S" >> ./trustlist.txt
65