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@…>, 4 years ago

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

  • Property mode set to 100644
File size: 3.6 KB
  • test/test_ca.mk

    From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
    Date: Sun, 17 Apr 2016 16:23:31 -0400
    Subject: use --outfile instead of stdio redirection
    
    This way, when a command fails, it shouldn't create files that make
    could get confused by.
    ---
     test/test_ca.mk | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/test/test_ca.mk b/test/test_ca.mk
    index b896110..b3a3192 100644
    a b pgpcrc: pgpcrc.c 
    1818%/secret.key:
    1919        mkdir -p $(dir $@)
    2020        chmod 0700 $(dir $@)
    21         certtool --generate-privkey > $@
     21        certtool --outfile $@ --generate-privkey
    2222
    2323%/secret.pgp.raw: %.uid %/secret.key
    2424        PEM2OPENPGP_EXPIRATION=86400 PEM2OPENPGP_USAGE_FLAGS=authenticate,certify,sign pem2openpgp "$$(cat $<)" < $(dir $@)secret.key > $@
    pgpcrc: pgpcrc.c 
    4444%/cert.pgp: %/minimal.pgp authority/gpg.conf
    4545        GNUPGHOME=authority $(GPG_FLOCK) gpg --import $<
    4646        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 :)"
    47         GNUPGHOME=authority gpg --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@
     47        GNUPGHOME=authority gpg --output $@ --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)"
    4848
    4949# special cases for the authorities' root certs:
    5050authority/x509.pem: authority.template authority/secret.key
    51         certtool --generate-self-signed --load-privkey authority/secret.key --template authority.template > $@
     51        certtool --outfile $@ --generate-self-signed --load-privkey authority/secret.key --template authority.template
    5252rogueca/x509.pem: $(srcdir)/rogueca.template rogueca/secret.key
    53         certtool --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template > $@
     53        certtool --outfile $@ --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template
    5454
    5555%/cert-request: %.template %/secret.key
    56         certtool --generate-request --load-privkey $(dir $@)secret.key --template $< > $@
     56        certtool --outfile $@ --generate-request --load-privkey $(dir $@)secret.key --template $<
    5757
    5858# normal case: certificates signed by test CA
    5959%/x509.pem: %.template %/cert-request authority/secret.key authority/x509.pem
    60         certtool --generate-certificate --load-ca-certificate authority/x509.pem --load-ca-privkey authority/secret.key --load-request $(dir $@)cert-request --template $< > $@
     60        certtool --outfile $@ --generate-certificate --load-ca-certificate authority/x509.pem --load-ca-privkey authority/secret.key --load-request $(dir $@)cert-request --template $<
    6161
    6262# error case: certificates signed by rogue CA
    6363rogue%/x509.pem: rogue%.template rogue%/cert-request rogueca/x509.pem
    64         certtool --generate-certificate --load-ca-certificate rogueca/x509.pem --load-ca-privkey rogueca/secret.key --load-request $(dir $@)cert-request --template $< > $@
     64        certtool --outfile $@ --generate-certificate --load-ca-certificate rogueca/x509.pem --load-ca-privkey rogueca/secret.key --load-request $(dir $@)cert-request --template $<
    6565
    6666%/softhsm.conf: %/secret.key
    6767        echo "0:$(dir $@)softhsm.db" > $@
    rogue%/x509.pem: rogue%.template rogue%/cert-request rogueca/x509.pem 
    8787# fail.
    8888%/crl.pem: %/x509.pem ${srcdir}/%-crl.template
    8989        certtool --generate-crl \
     90                --outfile $@ \
    9091                --load-ca-privkey authority/secret.key \
    9192                --load-ca-certificate authority/x509.pem \
    9293                --load-certificate $< \
    93                 --template "${srcdir}/$(*)-crl.template" \
    94                 > $@
     94                --template "${srcdir}/$(*)-crl.template"
Note: See TracBrowser for help on using the repository browser.