passing a recipient to gpg
Thu Jul 10 23:54:02 2003
Content-Description: signed data
On Thursday 10 Jul 2003 9:11 pm, Harald Katzer wrote:
> currently I am playing around with GnuPG for studying it's features and
> Now I simply want to specify an recipient on command line using so I type=
> gpg --recipient foo --sign --encrypt testfile
> gpg -r foo --sign --encrypt testfile
> But now gpg asks me for foo's passphrase, though foo is meant to be the
> recipient, and ignores foo2's secret-key for signing the testfile.
> Whats wrong??
The same options work for me, maybe there's a problem with the default key=
e.g. foo is a friend's key in my public ring but not secret ring.
$ gpg -a -r foo --sign --encrypt testfile
You need a passphrase to unlock the secret key for
user: "Neil Williams (CodeHelp) <email@example.com>"
1024-bit DSA key, ID 28BCB3E3, created 2002-01-27
$ ls testfile*
$ gpg --decrypt testfile.asc
gpg: encrypted with 2048-bit ELG-E key, ID foo, created 2002-11-01
my friend's UID
gpg: decryption failed: secret key not available
gpg -vv --verify-files stonetest.html.asc
gpg: armor: BEGIN PGP MESSAGE
gpg: armor header: Version: GnuPG v1.2.1 (GNU/Linux)
:pubkey enc packet: version 3, algo 16, keyid foosubkeyID
i.e. the contents of the message have been encrypted with the encryption=20
subkey of the intended recipient, foosubkeyID matches the subkey in gpg=20
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----