passing a recipient to gpg

Neil Williams linux@codehelp.co.uk
Thu Jul 10 23:54:02 2003


--Boundary-02=_+DeD/zJIQqBflyc
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: signed data
Content-Disposition: inline

On Thursday 10 Jul 2003 9:11 pm, Harald Katzer wrote:
> hi,
>
> currently I am playing around with GnuPG for studying it's features and
> funcionality.
> Now I simply want to specify an recipient on command line using so I type=
d:
> gpg --recipient foo --sign --encrypt testfile
> or
> 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=
=20
settings?

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) <linux@codehelp.co.uk>"
1024-bit DSA key, ID 28BCB3E3, created 2002-01-27

$ ls testfile*
testfile      testfile.asc

$ 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
=2D-list-keys foo.

=2D-=20

Neil Williams
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://www.codehelp.co.uk
http://www.dclug.org.uk

http://www.wewantbroadband.co.uk/


--Boundary-02=_+DeD/zJIQqBflyc
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA/DeD+iAEJSii8s+MRAukhAJ9kgoAAmF5TMVoYXoODtjLgZsUm/QCg0g2B
C9VSDS7sD8GpTkhhgt3pH7M=
=Diyg
-----END PGP SIGNATURE-----

--Boundary-02=_+DeD/zJIQqBflyc--