Changeset 24c6c16 in mod_gnutls for test/Makefile.in
- Timestamp:
- Oct 19, 2015, 9:07:41 PM (5 years ago)
- Branches:
- debian/master, debian/stretch-backports, jessie-backports
- Children:
- 8bf5809
- Parents:
- 5d13786 (diff), 89f863f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/Makefile.in
r5d13786 r24c6c16 14 14 15 15 @SET_MAKE@ 16 17 #!/usr/bin/make -f 18 # Authors: 19 # Daniel Kahn Gillmor <dkg@fifthhorseman.net> 20 # Thomas Klute <thomas2.klute@uni-dortmund.de> 21 22 # General rules to set up a miniature CA & server & client environment 23 # for the test suite 16 24 VPATH = @srcdir@ 17 25 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' … … 80 88 target_triplet = @target@ 81 89 @USE_MSVA_TRUE@am__append_1 = test-15_basic_msva.bash 90 DIST_COMMON = $(srcdir)/test_ca.mk $(srcdir)/Makefile.in \ 91 $(srcdir)/Makefile.am $(am__dist_check_SCRIPTS_DIST) \ 92 $(top_srcdir)/config/test-driver README 93 @USE_MSVA_TRUE@am__append_2 = $(msva_home)/trustdb.gpg client.uid 94 @USE_MSVA_TRUE@am__append_3 = $(msva_home)/trustdb.gpg 82 95 subdir = test 83 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \84 $(am__dist_check_SCRIPTS_DIST) \85 $(top_srcdir)/config/test-driver README86 96 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 87 97 am__aclocal_m4_deps = $(top_srcdir)/m4/apache.m4 \ … … 584 594 TESTS = $(dist_check_SCRIPTS) 585 595 596 # Identities in the miniature CA, server, and client environment for 597 # the test suite 598 identities = server authority client imposter rogueca 599 # Append strings after ":=" to each identity to generate a list of 600 # necessary files 601 pgp_tokens = $(identities:=/secring.gpg) $(identities:=/cert.pgp) \ 602 $(identities:=/secret.pgp) 603 604 x509_keys = $(identities:=/secret.key) 605 x509_certs = $(identities:=/x509.pem) 606 x509_tokens = $(x509_certs) $(x509_keys) 607 tokens = $(x509_tokens) $(pgp_tokens) 608 586 609 # Test cases trying to create keys and certificates in parallel causes 587 610 # race conditions. Ensure that all keys and certificates are generated … … 596 619 597 620 # SoftHSM files 598 check_DATA = setup.done server/crl.pem server/softhsm.db 621 check_DATA = $(tokens) server/crl.pem $(am__append_2) \ 622 server/softhsm.db make-test-dirs 599 623 600 624 # Delete X.509 certificates and generated templates on "mostlyclean" … … 608 632 # one day, so regenerating them is both fast and frequently 609 633 # necessary. 610 MOSTLYCLEANFILES = setup.done cache/* logs/* outputs/* server/crl.pem \ 611 */x509.pem $(generated_templates) */*.pgp */*.gpg */*.gpg~ \ 612 */gpg.conf tests/24_pkcs11_cert/softhsm.conf 634 635 # Delete lock files for test servers on "mostlyclean" target. 636 MOSTLYCLEANFILES = cache/* logs/* outputs/* server/crl.pem */x509.pem \ 637 $(generated_templates) *.uid */*.pgp */*.gpg */*.gpg~ \ 638 */gpg.conf authority/lock *.lock $(am__append_3) \ 639 tests/24_pkcs11_cert/softhsm.conf server/softhsm.db 613 640 cert_templates = authority.template.in client.template.in \ 614 641 imposter.template.in rogueca.template server.template.in … … 617 644 imposter.template server.template 618 645 646 647 # Delete X.509 private keys on full clean. Note that unless you need 648 # to generate fresh keys, the "mostlyclean" target should be 649 # sufficient (see below). 650 # GnuPG random pool, no need to regenerate on every build 651 CLEANFILES = $(x509_keys) authority/random_seed 652 653 # rule to build MSVA trust database 654 @USE_MSVA_TRUE@msva_home = msva.gnupghome 655 extra_dirs = logs cache outputs 656 657 # Apache configuration and data files 619 658 apache_data = base_apache.conf cgi_module.conf data/* mime.types proxy_mods.conf 620 659 EXTRA_DIST = $(apache_data) $(cert_templates) *.uid.in proxy_backend.bash \ 621 runtests server-crl.template server-softhsm.conf softhsm.bash \ 622 TestMakefile 623 624 660 runtests server-crl.template server-softhsm.conf softhsm.bash 661 662 663 # Lockfile for the main Apache process 664 test_lockfile = ./test.lock 625 665 # Maximum wait time in seconds for flock to aquire instance lock files 626 666 lock_wait = 30 627 667 AM_TESTS_ENVIRONMENT = export APACHE2=$(APACHE2); \ 628 668 export AP_LIBEXECDIR=$(AP_LIBEXECDIR); \ 629 export TEST_LOCK_WAIT=$(lock_wait); \ 669 export TEST_LOCK="$(test_lockfile)"; \ 670 export TEST_LOCK_WAIT="$(lock_wait)"; \ 630 671 export TEST_HOST="$(TEST_HOST)"; \ 631 672 export TEST_IP="$(TEST_IP)"; \ 673 export TEST_PORT="$(TEST_PORT)"; \ 674 export MSVA_PORT="$(MSVA_PORT)"; \ 675 export TEST_MSVA_MAX_WAIT="$(TEST_MSVA_MAX_WAIT)"; \ 676 export TEST_MSVA_WAIT="$(TEST_MSVA_WAIT)"; \ 677 export TEST_QUERY_DELAY="$(TEST_QUERY_DELAY)"; \ 632 678 export BACKEND_HOST="$(TEST_HOST)"; \ 633 679 export BACKEND_IP="$(TEST_IP)"; … … 637 683 .SUFFIXES: 638 684 .SUFFIXES: .log .test .test$(EXEEXT) .trs 639 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)685 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/test_ca.mk $(am__configure_deps) 640 686 @for dep in $?; do \ 641 687 case '$(am__configure_deps)' in \ … … 658 704 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 659 705 esac; 706 $(srcdir)/test_ca.mk: 660 707 661 708 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) … … 1192 1239 1193 1240 clean-generic: 1241 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 1194 1242 1195 1243 distclean-generic: … … 1283 1331 1284 1332 1333 %.template: $(srcdir)/%.template.in 1334 sed s/__HOSTNAME__/$(TEST_HOST)/ < $< > $@ 1335 1336 %.uid: $(srcdir)/%.uid.in 1337 sed s/__HOSTNAME__/$(TEST_HOST)/ < $< > $@ 1338 1339 %/secret.key: 1340 mkdir -p $(dir $@) 1341 chmod 0700 $(dir $@) 1342 certtool --generate-privkey > $@ 1343 1344 %/secring.gpg: %.uid %/secret.key 1345 rm -f $(dir $@)pubring.gpg $(dir $@)secring.gpg $(dir $@)trustdb.gpg 1346 PEM2OPENPGP_EXPIRATION=86400 PEM2OPENPGP_USAGE_FLAGS=authenticate,certify,sign pem2openpgp "$$(cat $<)" < $(dir $@)secret.key | GNUPGHOME=$(dir $@) gpg --import 1347 printf "%s:6:\n" "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" | GNUPGHOME=$(dir $@) gpg --import-ownertrust 1348 1349 %/gpg.conf: %/secring.gpg 1350 printf "default-key %s\n" "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@ 1351 1352 %/secret.pgp: %/secring.gpg 1353 GNUPGHOME=$(dir $@) gpg --armor --batch --no-tty --yes --export-secret-key "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@ 1354 1355 %/minimal.pgp: %/secring.gpg 1356 GNUPGHOME=$(dir $@) gpg --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@ 1357 1358 # Import and signing modify the shared keyring, which leads to race 1359 # conditions with parallel make. Locking avoids this problem. 1360 %/cert.pgp: %/minimal.pgp authority/gpg.conf 1361 GNUPGHOME=authority flock authority/lock gpg --import $< 1362 GNUPGHOME=authority flock authority/lock gpg --batch --sign-key --no-tty --yes "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" 1363 GNUPGHOME=authority gpg --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@ 1364 1365 # special cases for the authorities' root certs: 1366 authority/x509.pem: authority.template authority/secret.key 1367 certtool --generate-self-signed --load-privkey authority/secret.key --template authority.template > $@ 1368 rogueca/x509.pem: $(srcdir)/rogueca.template rogueca/secret.key 1369 certtool --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template > $@ 1370 1371 %/cert-request: %.template %/secret.key 1372 certtool --generate-request --load-privkey $(dir $@)secret.key --template $< > $@ 1373 1374 %/x509.pem: %.template %/cert-request authority/secret.key authority/x509.pem 1375 certtool --generate-certificate --load-ca-certificate authority/x509.pem --load-ca-privkey authority/secret.key --load-request $(dir $@)cert-request --template $< > $@ 1376 1377 %/softhsm.db: %/x509.pem %/secret.key 1378 SOFTHSM_CONF="$(srcdir)/$(*)-softhsm.conf" $(srcdir)/softhsm.bash init $(dir $@)secret.key $(dir $@)x509.pem 1379 1380 # Generate CRL revoking a certain certificate. Currently used to 1381 # revoke the server certificate and check if setting the CRL as 1382 # GnuTLSProxyCRLFile causes the connection to the back end server to 1383 # fail. 1384 %/crl.pem: %/x509.pem ${srcdir}/%-crl.template 1385 certtool --generate-crl \ 1386 --load-ca-privkey authority/secret.key \ 1387 --load-ca-certificate authority/x509.pem \ 1388 --load-certificate $< \ 1389 --template "${srcdir}/$(*)-crl.template" \ 1390 > $@ 1391 @USE_MSVA_TRUE@$(msva_home)/trustdb.gpg: authority/minimal.pgp client/cert.pgp 1392 @USE_MSVA_TRUE@ mkdir -p -m 0700 $(dir $@) 1393 @USE_MSVA_TRUE@ GNUPGHOME=$(dir $@) gpg --import < $< 1394 @USE_MSVA_TRUE@ printf "%s:6:\n" "$$(GNUPGHOME=authority gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" | GNUPGHOME=$(dir $@) gpg --import-ownertrust 1395 @USE_MSVA_TRUE@ GNUPGHOME=$(dir $@) gpg --import < client/cert.pgp 1396 @USE_MSVA_TRUE@ printf "keyserver does-not-exist.example\n" > $(msva_home)/gpg.conf 1397 make-test-dirs: 1398 mkdir -p $(extra_dirs) 1399 .PHONY: make-test-dirs 1400 1285 1401 clean-local: 1286 $(MAKE) -f $(srcdir)/TestMakefile $(AM_MAKEFLAGS) clean 1287 1288 # This rule can be used for any TestMakefile target not included in 1289 # setup.done. The dependency on setup.done is used to avoid race 1290 # conditions between multiple calls to TestMakefile for key and 1291 # certificate generation. It is ignored for setup.done itself. 1292 server/crl.pem server/softhsm.db setup.done: setup.done 1293 TEST_HOST="$(TEST_HOST)" TEST_IP="$(TEST_IP)" srcdir=$(srcdir) \ 1294 $(MAKE) -f $(srcdir)/TestMakefile $(AM_MAKEFLAGS) $@ 1402 -rmdir $(identities) || true 1403 -rmdir $(extra_dirs) || true 1404 @USE_MSVA_TRUE@ -rmdir $(msva_home) || true 1405 1406 # port for the main Apache server 1407 TEST_PORT ?= 9932 1408 # port for MSVA in test cases that use it 1409 MSVA_PORT ?= 9933 1410 # maximum time to wait for MSVA startup 1411 TEST_MSVA_MAX_WAIT ?= 10 1412 # wait loop time for MSVA startup 1413 TEST_MSVA_WAIT ?= 0.4 1414 # seconds for the HTTP request to be sent and responded to 1415 TEST_QUERY_DELAY ?= 30 1416 1417 # Echo AM_TESTS_ENVIRONMENT. This can be useful for debugging, e.g. if 1418 # you want to manually run an Apache instance with Valgrind using the 1419 # same configuration as a test case. 1420 show-test-env: export TEST_ENV=$(AM_TESTS_ENVIRONMENT) 1421 show-test-env: 1422 @echo "$${TEST_ENV}" 1295 1423 1296 1424 # Tell versions [3.59,3.63) of GNU make to not export all variables.
Note: See TracChangeset
for help on using the changeset viewer.