From 5f3bbe5754c1dadc23f4b2fea19506741fbf1100 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 24 Oct 2022 22:30:11 -0500 Subject: [PATCH] Add option to pipe signed message to mock signature verification tool --- testsuite/lib/exec/mockgpgv | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 2.25.1