g10: fix regression of card key generation with backup

NIIBE Yutaka gniibe at fsij.org
Tue Dec 15 03:32:42 CET 2015


Hello,

I'm looking the issue 2169.

    Smartcard card-edit generate fails when off-card backup
    of encryption key is selected:
    https://bugs.gnupg.org/gnupg/issue2169

If we keep the same usage of GnuPG, I think that it will be something
like:

* Rewrite gen_card_key_with_backup
* Remove save_unprotected_key_to_card
* Remove generate_raw_key
* Remove do_ask_passphrase

And the rewrite will be in g10/keygen.c:

(1) Call do_create to ask creation of a private key on gpg-agent
(2) Call agent_export_key to receive a secret key from agent
(3) Save it to a file by OpenPGP format.  File: sk_%08lX%08lX.gpg
(4) Call agent_keytocard to ask move of a key to card
    (or Call card_store_subkey?)
(5) Call agent_scd_learn (NULL, 1) to remove the key in agent

If this is OK, I'd like to take the issue 2169 as assigned to me.
-- 



More information about the Gnupg-devel mailing list