agent: adding KEYTOCARD command (master branch)
NIIBE Yutaka
gniibe at fsij.org
Tue Feb 12 06:29:07 CET 2013
I updated the changes of gpg-agent so that it uses secure memory for
private key, and applied and pushed to master branch.
This change is 2.1 only (not for 2.0).
On 2013-02-05 at 13:55 +0900, NIIBE Yutaka wrote:
> On 2013-02-04 at 14:40 +0100, Werner Koch wrote:
> > On Mon, 4 Feb 2013 01:34, gniibe at fsij.org said:
> >
> > > I think that the reason why it is not yet supported is because of the
> > > shift of secret key handling to gpg-agent.
> >
> > Right, after that change some card specific commands are not yet
> > working.
>
> Here's the patch.
>
> It works for me, but the behavior of gpg command has been changed. In
> 2.0, we invoke --edit-key to invoke keytocard subcommand. After we
> store private keys to card, it goes like this:
>
> gpg> quit
> Save changes? (y/N) n
> Quit without saving? (y/N) y
> $
>
> But, master branch don't ask "Save changes?", and it has been changed
> already in gpg-agent's storage.
>
>
> gpg: Implement card_store_subkey again.
>
> * g10/call-agent.h (agent_keytocard): New.
> * g10/call-agent.c (agent_keytocard): New.
> * g10/card-util.c (replace_existing_key_p): Returns 1 when replace.
> (card_generate_subkey): Check return value of replace_existing_key_p.
> (card_store_subkey): Implement again using agent_keytocard.
>
> agent: Add KEYTOCARD command.
>
> * agent/agent.h (divert_writekey, agent_card_writekey): New.
> * agent/call-scd.c (inq_writekey_parms, agent_card_writekey): New.
> * agent/command.c (cmd_keytocard, hlp_keytocard): New.
> (register_commands): Add cmd_keytocard.
> * agent/divert-scd.c (divert_writekey): New.
--
More information about the Gnupg-devel
mailing list