source: mod_gnutls/debian/patches/0002-use-outfile-instead-of-stdio-redirection.patch @ 06056cb

debian/masterdebian/stretch-backportsjessie-backports
Last change on this file since 06056cb was 06056cb, checked in by Daniel Kahn Gillmor <dkg@…>, 7 years ago

adjust test suite to work with gpg "modern" as well as "classic"

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[06056cb]1From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2Date: Sun, 17 Apr 2016 16:23:31 -0400
3Subject: use --outfile instead of stdio redirection
4
5This way, when a command fails, it shouldn't create files that make
6could get confused by.
7---
8 test/test_ca.mk | 18 +++++++++---------
9 1 file changed, 9 insertions(+), 9 deletions(-)
10
11diff --git a/test/test_ca.mk b/test/test_ca.mk
12index b896110..b3a3192 100644
13--- a/test/test_ca.mk
14+++ b/test/test_ca.mk
15@@ -18,7 +18,7 @@ pgpcrc: pgpcrc.c
16 %/secret.key:
17        mkdir -p $(dir $@)
18        chmod 0700 $(dir $@)
19-       certtool --generate-privkey > $@
20+       certtool --outfile $@ --generate-privkey
21 
22 %/secret.pgp.raw: %.uid %/secret.key
23        PEM2OPENPGP_EXPIRATION=86400 PEM2OPENPGP_USAGE_FLAGS=authenticate,certify,sign pem2openpgp "$$(cat $<)" < $(dir $@)secret.key > $@
24@@ -44,24 +44,24 @@ pgpcrc: pgpcrc.c
25 %/cert.pgp: %/minimal.pgp authority/gpg.conf
26        GNUPGHOME=authority $(GPG_FLOCK) gpg --import $<
27        GNUPGHOME=authority $(GPG_FLOCK) gpg --batch --sign-key --no-tty --yes "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)"
28-       GNUPGHOME=authority gpg --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@
29+       GNUPGHOME=authority gpg --output $@ --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)"
30 
31 # special cases for the authorities' root certs:
32 authority/x509.pem: authority.template authority/secret.key
33-       certtool --generate-self-signed --load-privkey authority/secret.key --template authority.template > $@
34+       certtool --outfile $@ --generate-self-signed --load-privkey authority/secret.key --template authority.template
35 rogueca/x509.pem: $(srcdir)/rogueca.template rogueca/secret.key
36-       certtool --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template > $@
37+       certtool --outfile $@ --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template
38 
39 %/cert-request: %.template %/secret.key
40-       certtool --generate-request --load-privkey $(dir $@)secret.key --template $< > $@
41+       certtool --outfile $@ --generate-request --load-privkey $(dir $@)secret.key --template $<
42 
43 # normal case: certificates signed by test CA
44 %/x509.pem: %.template %/cert-request authority/secret.key authority/x509.pem
45-       certtool --generate-certificate --load-ca-certificate authority/x509.pem --load-ca-privkey authority/secret.key --load-request $(dir $@)cert-request --template $< > $@
46+       certtool --outfile $@ --generate-certificate --load-ca-certificate authority/x509.pem --load-ca-privkey authority/secret.key --load-request $(dir $@)cert-request --template $<
47 
48 # error case: certificates signed by rogue CA
49 rogue%/x509.pem: rogue%.template rogue%/cert-request rogueca/x509.pem
50-       certtool --generate-certificate --load-ca-certificate rogueca/x509.pem --load-ca-privkey rogueca/secret.key --load-request $(dir $@)cert-request --template $< > $@
51+       certtool --outfile $@ --generate-certificate --load-ca-certificate rogueca/x509.pem --load-ca-privkey rogueca/secret.key --load-request $(dir $@)cert-request --template $<
52 
53 %/softhsm.conf: %/secret.key
54        echo "0:$(dir $@)softhsm.db" > $@
55@@ -87,8 +87,8 @@ rogue%/x509.pem: rogue%.template rogue%/cert-request rogueca/x509.pem
56 # fail.
57 %/crl.pem: %/x509.pem ${srcdir}/%-crl.template
58        certtool --generate-crl \
59+               --outfile $@ \
60                --load-ca-privkey authority/secret.key \
61                --load-ca-certificate authority/x509.pem \
62                --load-certificate $< \
63-               --template "${srcdir}/$(*)-crl.template" \
64-               > $@
65+               --template "${srcdir}/$(*)-crl.template"
Note: See TracBrowser for help on using the repository browser.