Blame tests/gpgsm/Makefile.am

Packit Service 672cf4
# Copyright (C) 2000 Werner Koch (dd9jn)
Packit Service 672cf4
# Copyright (C) 2001 g10 Code GmbH
Packit Service 672cf4
#
Packit Service 672cf4
# This file is part of GPGME.
Packit Service 672cf4
#
Packit Service 672cf4
# GPGME is free software; you can redistribute it and/or modify it
Packit Service 672cf4
# under the terms of the GNU Lesser General Public License as
Packit Service 672cf4
# published by the Free Software Foundation; either version 2.1 of the
Packit Service 672cf4
# License, or (at your option) any later version.
Packit Service 672cf4
#
Packit Service 672cf4
# GPGME is distributed in the hope that it will be useful, but WITHOUT
Packit Service 672cf4
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit Service 672cf4
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
Packit Service 672cf4
# Public License for more details.
Packit Service 672cf4
#
Packit Service 672cf4
# You should have received a copy of the GNU Lesser General Public
Packit Service 6c01f9
# License along with this program; if not, write to the Free Software
Packit Service 6c01f9
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Packit Service 672cf4
Packit Service 672cf4
## Process this file with automake to produce Makefile.in
Packit Service 672cf4
Packit Service 672cf4
GPGSM = gpgsm
Packit Service 672cf4
GPG_AGENT = gpg-agent
Packit Service 672cf4
Packit Service 6c01f9
TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= \
Packit Service 672cf4
                    top_srcdir=$(top_srcdir)
Packit Service 672cf4
Packit Service 672cf4
noinst_HEADERS = t-support.h
Packit Service 672cf4
Packit Service 672cf4
c_tests = t-import t-keylist t-encrypt t-verify t-decrypt t-sign t-export
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
TESTS = initial.test $(c_tests) final.test
Packit Service 672cf4
Packit Service 672cf4
EXTRA_DIST = cert_dfn_pca01.der cert_dfn_pca15.der cert_g10code_test1.der \
Packit Service 672cf4
	$(key_id) initial.test final.test
Packit Service 672cf4
Packit Service 672cf4
AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@
Packit Service 672cf4
AM_LDFLAGS = -no-install
Packit Service 6c01f9
LDADD = ../../src/libgpgme.la
Packit Service 672cf4
Packit Service 672cf4
# We don't run t-genkey in the test suite, because it takes too long
Packit Service 672cf4
# and needs a working pinentry.
Packit Service 672cf4
noinst_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt
Packit Service 672cf4
Packit Service 672cf4
key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939
Packit Service 672cf4
Packit Service 672cf4
CLEANFILES = pubring-stamp pubring.kbx pubring.kbx~ gpgsm.conf trustlist.txt \
Packit Service 6c01f9
	random_seed S.gpg-agent
Packit Service 672cf4
Packit Service 672cf4
clean-local:
Packit Service 6c01f9
	-$(top_srcdir)/tests/start-stop-agent --stop
Packit Service 672cf4
	-rm -fR private-keys-v1.d
Packit Service 672cf4
Packit Service 6c01f9
export GNUPGHOME := $(abs_builddir)
Packit Service 6c01f9
Packit Service 6c01f9
export GPG_AGENT_INFO :=
Packit Service 6c01f9
Packit Service 672cf4
BUILT_SOURCES = gpgsm.conf trustlist.txt pubring-stamp \
Packit Service 6c01f9
           private-keys-v1.d/gpg-sample.stamp
Packit Service 672cf4
Packit Service 6c01f9
pubring-stamp: $(srcdir)/cert_g10code_test1.der ./private-keys-v1.d/gpg-sample.stamp
Packit Service 6c01f9
	$(GPGSM) --import $(srcdir)/cert_g10code_test1.der
Packit Service 672cf4
	touch pubring-stamp
Packit Service 672cf4
Packit Service 672cf4
gpgsm.conf:
Packit Service 672cf4
	echo disable-crl-checks > ./gpgsm.conf
Packit Service 672cf4
	echo faked-system-time 1008241200 >> ./gpgsm.conf
Packit Service 672cf4
	echo "agent-program `which $(GPG_AGENT)`|--debug-quick-random" >> ./gpgsm.conf
Packit Service 672cf4
Packit Service 6c01f9
private-keys-v1.d/gpg-sample.stamp: $(srcdir)/$(key_id)
Packit Service 6c01f9
	-gpgconf --kill all
Packit Service 672cf4
	$(MKDIR_P) ./private-keys-v1.d
Packit Service 672cf4
	cp $(srcdir)/$(key_id) private-keys-v1.d/$(key_id).key
Packit Service 6c01f9
	echo x > ./private-keys-v1.d/gpg-sample.stamp
Packit Service 672cf4
Packit Service 672cf4
trustlist.txt:
Packit Service 672cf4
	echo $(key_id) > ./trustlist.txt
Packit Service 672cf4
	echo >> ./trustlist.txt
Packit Service 672cf4
	echo "# CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE" >> ./trustlist.txt
Packit Service 672cf4
	echo "3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E S" >> ./trustlist.txt
Packit Service 672cf4