mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
More agent support for gpg.
This commit is contained in:
parent
5a679857ef
commit
54591341a4
33 changed files with 496 additions and 311 deletions
16
g10/import.c
16
g10/import.c
|
@ -362,7 +362,7 @@ import_print_stats (void *hd)
|
|||
* Read the next keyblock from stream A.
|
||||
* PENDING_PKT should be initialzed to NULL
|
||||
* and not chnaged form the caller.
|
||||
* Retunr: 0 = okay, -1 no more blocks or another errorcode.
|
||||
* Return: 0 = okay, -1 no more blocks or another errorcode.
|
||||
*/
|
||||
static int
|
||||
read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
|
||||
|
@ -1142,8 +1142,15 @@ transfer_secret_keys (ctrl_t ctrl, struct stats_s *stats, kbnode_t sec_keyblock)
|
|||
stats->count++;
|
||||
stats->secret_read++;
|
||||
|
||||
/* For now we ignore the stub keys becuase we don't have real
|
||||
support for them in gpg-agent. */
|
||||
/* We ignore stub keys. The way we handle them in other parts
|
||||
of the code is by asking the agent whether any secret key is
|
||||
available for a given keyblock and then concluding that we
|
||||
have a secret key; all secret (sub)keys of the keyblock the
|
||||
agent does not know of are then stub keys. This works also
|
||||
for card stub keys. The learn command or the card-status
|
||||
command may be used to check with the agent whether a card
|
||||
has been inserted and a stub key is in turn generated by the
|
||||
agent. */
|
||||
if (ski->s2k.mode == 1001 || ski->s2k.mode == 1002)
|
||||
continue;
|
||||
|
||||
|
@ -1288,7 +1295,8 @@ transfer_secret_keys (ctrl_t ctrl, struct stats_s *stats, kbnode_t sec_keyblock)
|
|||
write_status (STATUS_RSA_OR_IDEA);
|
||||
idea_cipher_warn (0);
|
||||
}
|
||||
if (gpg_err_code (err) == GPG_ERR_CANCELED)
|
||||
if (gpg_err_code (err) == GPG_ERR_CANCELED
|
||||
|| gpg_err_code (err) == GPG_ERR_FULLY_CANCELED)
|
||||
break; /* Don't try the other subkeys. */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue