How to sign with non-subkey?

Simon Josefsson jas at extundo.com
Tue Mar 21 16:02:51 CET 2006


I recently created a signing sub-key (on a smartcard, if it matters)
and gpg now use it by default.  How do I sign messages using my
non-subkey?  I thought -u would do it, but it doesn't seem to work:

jas at latte:~$ echo foo |gpg -a -s -v -u b565716f
gpg: using subkey AABB1F7B instead of primary key B565716F
gpg: writing to stdout
gpg: using subkey AABB1F7B instead of primary key B565716F
gpg: RSA/SHA1 signature from: "AABB1F7B Simon Josefsson <simon at josefsson.org>"
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

owGbwMvMwMS4XF34xKrd8tWMp7mSGFwURP6l5edzdZxiYWBkYjBhZQKJ6Io0MACB
KAN/QXaibmJKSlFqcbFDel5pQbpeflF6VmKxQ2pFSWleSr5ecn4uAxenAMzQy+bM
/4v/zBGfa+XAOvOGXqTUwQde0rPmL9P6KDS/8HLSjbKjN5fM+bfO0StszgfhZK0N
R3X5lKuSzsUa1B5fWvKed/HOTZ9rbrUw8ZdwuT9d33bV/8xzcbFLe+y//76ttcg8
v3G1sbjG1kSh62GcnIEmgay1uU4C06ezaT7wbJ1222IN60yGD7w3DwAA
=HgpN
-----END PGP MESSAGE-----
jas at latte:~$

The key details are:

jas at latte:~$ gpg --edit-key b565716f
gpg (GnuPG) 1.4.2.2; Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Secret key is available.

pub  1280R/B565716F  created: 2002-05-05  expires: 2006-08-14  usage: CS
                     trust: ultimate      validity: ultimate
sub  1280R/4D5D40AE  created: 2002-05-05  expires: 2006-08-14  usage: E
sub  1024R/09CC4670  created: 2006-03-18  expires: 2007-04-22  usage: A
sub  1024R/AABB1F7B  created: 2006-03-18  expires: 2007-04-22  usage: S
sub  1024R/A14C401A  created: 2006-03-18  expires: 2007-04-22  usage: E
[ultimate] (1). Simon Josefsson <simon at josefsson.org>
[ultimate] (2)  Simon Josefsson <jas at extundo.com>

Command>
jas at latte:~$

Thanks,
Simon



More information about the Gnupg-users mailing list