mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
agent: Make --disable-extended-key-format a dummy option.
* agent/agent.h (opt): Remove enable_extended_key_format.
* agent/gpg-agent.c (enum cmd_and_opt_values): Turn
oDisableExtendedKeyFormat and oEnableExtendedKeyFormat into dummy
options.
* agent/protect.c (do_encryption): Remove arg use_ocb and
corresponding code.
(agent_protect): Ditto. Change all callers.
* agent/command.c (cmd_readkey): Do not test for key availability here
but defer that agent_write_shadow_key.
* agent/findkey.c (agent_write_private_key): Simplify due to the
removal of disable-extended-key-format.
(write_extended_private_key): Fold into agent_write_private_key.
Remove the maybe_update arg.
(agent_write_shadow_key): Ditto. Simplify.
--
GnuPG-bug-id: 6386
Backported-from-master: 6d792ae2eb
But with large changes to get 2.2 more aligned with master again. This
is not finished; in particular the bug is not fixed; this comes wit
the next patch.
This commit is contained in:
parent
db73f17f0c
commit
4f754caad8
12 changed files with 227 additions and 449 deletions
|
@ -2499,7 +2499,7 @@ card_key_available (ctrl_t ctrl, gcry_sexp_t *r_pk, char **cardsn)
|
|||
|
||||
/* (Shadow)-key is not available in our key storage. */
|
||||
agent_card_getattr (ctrl, "$DISPSERIALNO", &dispserialno);
|
||||
err = agent_write_shadow_key (0, grip, serialno, authkeyid, pkbuf, 0,
|
||||
err = agent_write_shadow_key (grip, serialno, authkeyid, pkbuf, 0,
|
||||
dispserialno);
|
||||
xfree (dispserialno);
|
||||
if (err)
|
||||
|
@ -3028,7 +3028,7 @@ ssh_key_to_protected_buffer (gcry_sexp_t key, const char *passphrase,
|
|||
buffer_new, buffer_new_n);
|
||||
|
||||
if (*passphrase)
|
||||
err = agent_protect (buffer_new, passphrase, buffer, buffer_n, 0, -1);
|
||||
err = agent_protect (buffer_new, passphrase, buffer, buffer_n, 0);
|
||||
else
|
||||
{
|
||||
/* The key derivation function does not support zero length
|
||||
|
@ -3159,8 +3159,8 @@ ssh_identity_register (ctrl_t ctrl, ssh_key_type_spec_t *spec,
|
|||
|
||||
/* Store this key to our key storage. We do not store a creation
|
||||
* timestamp because we simply do not know. */
|
||||
err = agent_write_private_key (key_grip_raw, buffer, buffer_n, 0, 0,
|
||||
NULL, NULL, NULL);
|
||||
err = agent_write_private_key (key_grip_raw, buffer, buffer_n, 0,
|
||||
NULL, NULL, NULL, 0);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue