Encrypt directly to keyfile
Hauke Laging
mailinglisten at hauke-laging.de
Mon Jul 7 00:53:18 CEST 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20140707/27149acc/attachment.sig>
More information about the Gnupg-users
mailing list