Am So 06.07.2014, 23:18:20 schrieb Matthias Fischer: > I can achieve something similar, by using: > $ gpg --no-default-keyring --keyring /tmp/keyring.once --import > <KEYFILE> $ gpg --no-default-keyring --keyring /tmp/keyring.once > --trust-model always --recipient <KEY-ID> -e > > But this requires an additional temporary file (which needs to be > deleted), and I still have to look for the Key-IDs in the file, to > give them as parameters. > > If there isn't an option for this, I think it would be a neat feature > to implement.
Why should a feature be added that can so easily be emulated by a simple
script?
gpgdir="/tmp/keyring.$$"
test -d "$gpgdir" && rm -r "$gpgdir"
gpg --homedir "$gpgdir" --import KEYFILE
KEY_ID="$(gpg --homedir "$gpgdir" --with-colons --list-keys |
awk -F: '$1 == "pub" {print $5;}')"
gpg --homedir "$gpgdir" --recipient "$KEY_ID" --encrypt FILE
rm -r "$gpgdir"
Hauke
--
Crypto für alle: http://www.openpgp-schulungen.de/fuer/unterstuetzer/
http://userbase.kde.org/Concepts/OpenPGP_Help_Spread
OpenPGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
