Secondary Keys

David Shaw dshaw@jabberwocky.com
Thu Aug 15 02:45:01 2002


On Wed, Aug 14, 2002 at 08:00:00PM -0400, Kevin A. Pieckiel wrote:
> I was playing around with a keyring I created that I wasn't going to use
> for anything.  Here is my observation and question about it:
> 
> I created a keypair with a secondary key for encryption only.  I then
> created a second secondary key for excryption.  Now, when I encrypt files,
> it always uses this second encryption key.  How can I get GnuPG to choose
> which secondary key to use for encryption?

Specify the key by keyid when you determine who to encrypt to, and add
an exclamation point.

i.e.:

  gpg -r (subkeyid)! --encrypt foo.bar

David

-- 
   David Shaw  |  dshaw@jabberwocky.com  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson