How to configure Smartcard without 'toggle'

Damien Goutte-Gattat dgouttegattat at incenp.org
Sat Feb 20 09:46:09 CET 2016


On 02/19/2016 06:04 PM, Nick Zbinden wrote:
> My problem is that I can not select the private keys, because I can not use 'toggle'.

You do not need the 'toggle' command to select the private keys. Using 
the 'key' command alone is enough:

    $ gpg2 --edit-key alice
    Secret key is available.

    sec  rsa2048/2EADF7D4
         created: 2015-06-05  expires: 2018-06-04  usage: SC
         trust: ultimate      validity: ultimate
    ssb  rsa2048/E3293B28
         created: 2015-06-05  expires: never       usage: E
    ssb  rsa2048/99E238AD
         created: 2015-06-05  expires: never       usage: S
    [ultimate] (1). Alice <alice at example.org>

Notice that secret keys are already displayed.

Now to select the first subkey:

    gpg> key 1

    sec  rsa2048/2EADF7D4
         created: 2015-06-05  expires: 2018-06-04  usage: SC
         trust: ultimate      validity: ultimate
    ssb* rsa2048/E3293B28
         created: 2015-06-05  expires: never       usage: E
    ssb  rsa2048/99E238AD
         created: 2015-06-05  expires: never       usage: S
    [ultimate] (1). Alice <alice at example.org>

Notice the '*'? It indicates the currently selected subkey. Now you can 
proceed with the 'keytocard' command.

> Since I never got to the point where the SmartCard is relevant, I don't think it has anything to do with the problem.

In your first message you said “the SmartCard rejects the key”, so I 
would say the SmartCard is definitively relevant. As would be relevant 
the exact error message that you got when you attempted the 'keytocard' 
command.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20160220/a000d962/attachment.sig>


More information about the Gnupg-users mailing list