diff options
Diffstat (limited to 'Master/tlpkg/bin/tl-sign-file')
-rwxr-xr-x | Master/tlpkg/bin/tl-sign-file | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Master/tlpkg/bin/tl-sign-file b/Master/tlpkg/bin/tl-sign-file index bab1d5fdff0..fbe71a41179 100755 --- a/Master/tlpkg/bin/tl-sign-file +++ b/Master/tlpkg/bin/tl-sign-file @@ -29,5 +29,24 @@ if test -n "$TL_GNUPGMAINOPTS" ; then gpgmainopts=$TL_GNUPGMAINOPTS fi -# sign -"$prg" $gpgmainopts $gpgopts "$1" +# sign, check that result doesn't use something expired. +# both --detach-sign and --verify exit 0 even when something is expired. +if "$prg" $gpgmainopts $gpgopts "$1"; then + if "$prg" --verify "$1".asc 2>&1 | grep xpired >/dev/null; then + echo "$0: expired key, output from $prg --verify $1.asc:" >&2 + "$prg" --verify "$1".asc + echo "$0: expired key, moving $1.asc to $1.asc.xpir." >&2 + mv "$1".asc "$1".asc.xpir || exit 1 + echo "$0: gpg command was:" >&2 + echo "$0:" "$prg" $gpgmainopts $gpgopts "$1" >&2 + echo "$0: good luck and goodbye." >&2 + exit 1 + fi +else + echo "$0: gpg failed, exiting." >&2 + echo "$0: gpg command was:" >&2 + echo "$0:" "$prg" $gpgmainopts $gpgopts "$1" >&2 + exit 1 +fi + +exit 0 |