Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 1998 01:49:04 +0200 (CEST)
From:      Michal Listos <mcl@Amnesiac.123.org>
To:        mail account <freebsd@mutsgo.kf7nn.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: pgp
Message-ID:  <Pine.BSF.3.96.980612013908.4505A-100000@Amnesiac.123.org>
In-Reply-To: <199806111939.OAA19900@mutsgo.kf7nn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 11 Jun 1998, mail account wrote:

> lately i have been getting these messages when trying to unencrypt
> mail
> 
> Running pgp: Checking signature...
> ERROR: Header line added to ASCII armor: "Hash: SHA1"
> ASCII armor corrupted.
> 
> Error: Transport armor stripping failed for file /tmp/pgptemp.$00
> 
> For a usage summary, type:  pgp -h
> For more detailed help, consult the PGP User's Guide.
> 
> What does it mean?
You're using version 2.6.x of pgp, which can't understand messages
encrypted using SHA1 algorithm (pgp5).

As I see, both elm and pine doesn't display oryginal message if 
pgp returns error. Pgp support is hardcoded into elm, but maybe
you can override it. I dunno about details, I'm a pine user.

Here is my modification of 'pgpdecode' script, distributed with pine,
hope this helps.

--- /usr/local/bin/pgpdecode
#! /bin/sh
# ---------- pgpdecode ---------
# 21.03.96 Roland Rosenfeld <roland@spinnaker.rhein.de>
#
# Sun Mar 24 12:01:21 MET 1996 Andreas Klemm <andreas@knobel.gun.de>
# The tmp files in the original version were world readable for
# the short time of unpacking, setting suitable umask prevents this
# Fri Jun 12 01:46:33 CEST 1998 Michal Listos <mcl@Amnesiac.123.org>
# Now it displays original message even if pgp returned an error
# (For example message signed with PGP5 using SHA1 algorighm),
# and checks whenever temporary file already exists.

umask 077

TMP=$$
while [ -e /tmp/pgpdecode.???.$TMP ]
do
 TMP=$(($TMP + 1))
done

trap "rm -f /tmp/pgpdecode.???.$TMP; exit" 0 1 2 15
cat > /tmp/pgpdecode.org.$TMP
(pgp -f < /tmp/pgpdecode.org.$TMP > /tmp/pgpdecode.txt.$TMP 
if [ $? -ne 0 ]
then
echo PGP returned an error, oryginal message follows: > /tmp/pgpdecode.txt.$TMP
cat /tmp/pgpdecode.org.$TMP >> /tmp/pgpdecode.txt.$TMP
fi) 2>&1 | tee /tmp/pgpdecode.pgp.$TMP 1>&2

sed -e 's/^/| /' /tmp/pgpdecode.pgp.$TMP

echo " "
cat /tmp/pgpdecode.txt.$TMP
rm -f /tmp/pgpdecode.???.$TMP
--- EOF


						Michal

* God used fork() to create Eve.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980612013908.4505A-100000>