OpenPGP card key generation: "make_keysig_packet failed: No such file or directory"
Closed, ResolvedPublic

Description

This works in 2.0.14-1.1ubuntu2, but not in 2.1.0-gitb9bcc77. Seen while
attempting a patch (to support bigger keys on cards), but this is a clean build
of that git commit without any of my changes.

cmb@lambda:~$ gpg2 --card-edit
[...]
gpg/card> generate
[...]
Change (N)ame, (C)omment, (E)-mail or (O)kay/(Q)uit? O
gpg: signing failed: No such file or directory
gpg: make_keysig_packet failed: No such file or directory
Key generation failed: No such file or directory

gdb tells me that agent_key_from_file calls read_key_file which looks for
~/.gnupg/private-keys-v1.d/[long hex here], which doesn't exist, and everything
gives up from there.

Agent log:

2011-03-12 16:58:16 gpg-agent[12655] DBG: chan_8 <- SCD GENKEY --
timestamp=20110312T165816 --force 1
2011-03-12 16:58:16 gpg-agent[12655] DBG: chan_9 -> GENKEY --
timestamp=20110312T165816 --force 1
[...]
2011-03-12 16:58:20 gpg-agent[12655] DBG: chan_9 <- S PROGRESS card_busy w 0 0
2011-03-12 16:58:20 gpg-agent[12655] DBG: chan_8 -> S PROGRESS card_busy w 0 0
2011-03-12 16:58:26 gpg-agent[12655] DBG: chan_9 <- S PROGRESS card_busy w 0 0
2011-03-12 16:58:26 gpg-agent[12655] DBG: chan_8 -> S PROGRESS card_busy w 0 0
2011-03-12 16:58:33 gpg-agent[12655] DBG: chan_9 <- S PROGRESS card_busy w 0 0
2011-03-12 16:58:33 gpg-agent[12655] DBG: chan_8 -> S PROGRESS card_busy w 0 0
2011-03-12 16:58:39 gpg-agent[12655] DBG: chan_9 <- S PROGRESS card_busy w 0 0
2011-03-12 16:58:39 gpg-agent[12655] DBG: chan_8 -> S PROGRESS card_busy w 0 0
2011-03-12 16:58:42 gpg-agent[12655] DBG: chan_9 <- S PROGRESS card_busy w 0 0
2011-03-12 16:58:42 gpg-agent[12655] DBG: chan_8 -> S PROGRESS card_busy w 0 0
2011-03-12 16:58:49 gpg-agent[12655] DBG: chan_9 <- S PROGRESS card_busy w 0 0
2011-03-12 16:58:49 gpg-agent[12655] DBG: chan_8 -> S PROGRESS card_busy w 0 0
[...KEY-DATA...]
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_9 <- S KEY-CREATED-AT 1299949096
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> S KEY-CREATED-AT 1299949096
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_9 <- S KEY-FPR
4639E6787292E8E3618E19ABE178CC66C2553A35
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> S KEY-FPR
4639E6787292E8E3618E19ABE178CC66C2553A35
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_9 <- OK
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> OK
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 <- RESET
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> OK
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 <- SIGKEY
DD9B0AA7A193576600732787F0DA704CAC1079FE
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> OK
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 <- SETKEYDESC
Please+enter+the+passphrase+to+unlock+the+secret+key+for+the+OpenPGP+certificate
:%0A%22[User+ID+not+found]%22%0A2048-bit+RSA+key,+ID+C2553A35,%0Acreated+2011-
03-12.%0A
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> OK
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 <- SETHASH 2
AA361D60F16A7210F9ECEB272B97A9B239C57AED
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> OK
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 <- PKSIGN
2011-03-12 16:58:50 gpg-agent[12655] failed to read the secret key
2011-03-12 16:58:50 gpg-agent[12655] command 'PKSIGN' failed: No such file or
directory
2011-03-12 16:58:50 gpg-agent[12655] DBG: chan_8 -> ERR 67141713 No such file or
directory <GPG Agent>

Happy to assist with this any way I can.

Details

Version
2.1.0-gitb9bcc77
cmb set Version to 2.1.0-gitb9bcc77.
cmb added a subscriber: cmb.
werner closed this task as Resolved.
werner claimed this task.
werner added a project: Mistaken.

Please don't report problems with a non-released development version to the
tracker. Bugs and missing features are expected. Use gnupg-devel@ instead.