#!/bin/sh
# Replacement for the GPG binary which enables PGP 2.x compatibility
OPTS="--load-extension rsa --rfc1991"
if [ -f /usr/lib/gnupg/idea ]; then
	OPTS="${OPTS} --load-extension idea"
fi
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 "$@"
