summaryrefslogtreecommitdiff
path: root/rapid-tunneling
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-06 11:25:14 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-06 11:25:14 +0000
commit48421749c15ba7e2e527b91cf3c5cffee3465b5e (patch)
tree7db03507f651b3fa398ef54c1f3a34848ed62f64 /rapid-tunneling
parent62549d8bde584228799cfc302ff6f67523c50481 (diff)
Allow disabling the client PGP check by setting REQUIRE_PGP in
/etc/rapid-tunneling/client . git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6556 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'rapid-tunneling')
-rwxr-xr-xrapid-tunneling8
1 files changed, 7 insertions, 1 deletions
diff --git a/rapid-tunneling b/rapid-tunneling
index 8699ced..3c1f843 100755
--- a/rapid-tunneling
+++ b/rapid-tunneling
@@ -7,13 +7,19 @@ if [ -z "$1" ]; then
exit 1
fi
+REQUIRE_PGP=yes
+
+if [ -r /etc/rapid-tunneling/client ]; then . /etc/rapid-tunneling/client; fi
+
tmpdir=`mktemp -d`
mkdir $tmpdir/recv $tmpdir/send
tar xzf "$1" -C $tmpdir/recv
# The signed data is everything except the signature itself:
(cd $tmpdir/recv; grep -- . * | grep -v ^sig.asc:) >$tmpdir/recv_data
-if ! gpg --quiet --verify $tmpdir/recv/sig.asc $tmpdir/recv_data; then
+if [ "$REQUIRE_PGP" = 'yes' ] &&
+ ! gpg --quiet --verify $tmpdir/recv/sig.asc $tmpdir/recv_data
+then
echo >&2 "$0: gpg signature verification failed."
echo >&2 "$0: Maybe someone's playing dirty tricks? Aborting."
exit 7