#!/bin/sh
# Replacement for the GPG binary which enables PGP 2.x compatibility
#  and will output in PGP 2.x compatible format.
OPTS="--load-extension rsa --load-extension idea --rfc1991 --cipher-algo idea --digest-algo md5"
if [ -d ${HOME}/.pgp -a -f ${HOME}/.pgp/pubring.pgp ]; then
	OPTS="${OPTS} --keyring ${HOME}/.pgp/pubring.pgp"
fi
if [ -d ${HOME}/.pgp -a -f ${HOME}/.pgp/secring.pgp ]; then
	OPTS="${OPTS} --secret-keyring ${HOME}/.pgp/secring.pgp"
fi
#echo /usr/bin/gpg.gnupg $OPTS "$@"
exec /usr/bin/gpg.gnupg $OPTS "$@"
