From: Jacob Bachmeyer Date: Tue, 25 Oct 2022 03:30:11 +0000 (-0500) Subject: Add option to pipe signed message to mock signature verification tool X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5f3bbe5754c1dadc23f4b2fea19506741fbf1100;p=gatekeeper.git Add option to pipe signed message to mock signature verification tool --- diff --git a/testsuite/lib/exec/mockgpgv b/testsuite/lib/exec/mockgpgv index c4ccfd2..a700199 100755 --- a/testsuite/lib/exec/mockgpgv +++ b/testsuite/lib/exec/mockgpgv @@ -1,7 +1,7 @@ #!/bin/bash # -*- bash -*- -# Copyright (C) 2021 Jacob Bachmeyer +# Copyright (C) 2021, 2022 Jacob Bachmeyer # # This file is part of a testsuite for the GNU FTP upload system. # @@ -214,7 +214,7 @@ function process_sig_file { ;; esac done -} <"$SigFile" +} # check that we were actually given a file to process if [ x"$*" = x ]; then @@ -226,8 +226,11 @@ fi # check that the file is readable and process it SigFile="$1" shift -if [ -r "$SigFile" ] ; then - process_sig_file "$@" +if [ x"$SigFile" = x- ] ; then + # signed message arrives on stdin + process_sig_file +elif [ -r "$SigFile" ] ; then + process_sig_file "$@" <"$SigFile" else log "can't" open '`'"$SigFile'" log verify signatures failed: file open error