Koch: A New Future for GnuPG
Koch: A New Future for GnuPG
Posted Jan 4, 2022 17:25 UTC (Tue) by ballombe (subscriber, #9523)In reply to: Koch: A New Future for GnuPG by vadim
Parent article: Koch: A New Future for GnuPG
> Instead of that, GPGME is a wrapper around the binary. Which means it still reads the user's configuration, uses ~/.gnupg, and so on. It makes it incredibly inconvenient if you'd like to create an application that's not completely connected to the user's normal identity.
Also gpgme cannot encrypt.
I solved this issue in Debian popularity-contest by creating a HOMEDIR before calling gpg and removing it afterward:
GPGHOME=`mktemp -d`
$GPG --batch --no-options --no-default-keyring --trust-model=always \
--homedir "$GPGHOME" --keyring $KEYRING --quiet \
--armor -o "$POPCONGPG" -r $POPCONKEY --encrypt "$POPCON"
rm -rf "$GPGHOME"
