> All that said, yes, GPG has no way to delete designated revoker > packets. The only way to do it is export your public key and run > 'gpgsplit' on it. Then delete the packet you want to get rid of and > 'cat' the packets back together.
See below for all the support for revoker removal that you need.
I had to do it. :-)
Question for Werner: Will there ever be a --with-colons for
--list-packets? This script might not be friendly to non-English versions.
Good luck
PSM
The following script is hereby public domain.
usage: strip-revokers < public.key > public-stripped.key
#!/bin/bash
umask 077
DIR=`mktemp -d`
PREFIX="$DIR/packet-"
IFS=$'\n'
gpgsplit -p "$PREFIX" "$@" <&0 &&
for i in $( find "$DIR" -name 'packet-*' ); do
if [ `echo -n "$i" | grep -cEe '002[.]sig'` != 0 ]; then
COUNT=`gpg --list-packets "$i" \
| grep -cEe '^[[:space:]]*hashed subpkt 12 len'`
if [ $COUNT == 0 ]; then
echo "Adding `basename "$i"`" >&2
cat "$i"
else
echo "Omitting `basename "$i"`: contains revocation" >&2
fi
else
echo "Adding `basename "$i"`" >&2
cat "$i"
fi
shred -uz "$i"
done
rmdir "$DIR"
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
