mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
agent,ssh: Fix for make not-inserted OpenPGP.3 keys available for SSH.
* agent/command-ssh.c (ssh_send_available_keys): Do not bump key_counter for ignored keys. Also use opt.debug instead of opt.verbose and fix a memory leak. -- The error shown by "ssh-add -l" before this fix was: error fetching identities: incomplete messag Fixes-commit: 193fcc2f7a8cca5240ce50499c54f99235a87e1c GnuPG-bug-id: 5996
This commit is contained in:
parent
1530d04725
commit
2766b9e56c
@ -2582,7 +2582,7 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *key_counter_p)
|
|||||||
xfree (cardsn);
|
xfree (cardsn);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
if (opt.verbose)
|
if (opt.debug)
|
||||||
gcry_log_debugsxp ("pubkey", key_public);
|
gcry_log_debugsxp ("pubkey", key_public);
|
||||||
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_CURVE
|
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_CURVE
|
||||||
|| gpg_err_code (err) == GPG_ERR_INV_CURVE)
|
|| gpg_err_code (err) == GPG_ERR_INV_CURVE)
|
||||||
@ -2594,12 +2594,13 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *key_counter_p)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gcry_sexp_release (key_public);
|
gcry_sexp_release (key_public);
|
||||||
break;
|
break; /* the readdir loop. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else /* Success */
|
||||||
|
(*key_counter_p)++;
|
||||||
|
|
||||||
gcry_sexp_release (key_public);
|
gcry_sexp_release (key_public);
|
||||||
(*key_counter_p)++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gnupg_closedir (dir);
|
gnupg_closedir (dir);
|
||||||
@ -2616,7 +2617,7 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *key_counter_p)
|
|||||||
xfree (cardsn);
|
xfree (cardsn);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
if (opt.verbose)
|
if (opt.debug)
|
||||||
gcry_log_debugsxp ("pubkey", key_public);
|
gcry_log_debugsxp ("pubkey", key_public);
|
||||||
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_CURVE
|
if (gpg_err_code (err) == GPG_ERR_UNKNOWN_CURVE
|
||||||
|| gpg_err_code (err) == GPG_ERR_INV_CURVE)
|
|| gpg_err_code (err) == GPG_ERR_INV_CURVE)
|
||||||
@ -2631,8 +2632,10 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *key_counter_p)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else /* Success. */
|
||||||
(*key_counter_p)++;
|
(*key_counter_p)++;
|
||||||
|
|
||||||
|
gcry_sexp_release (key_public);
|
||||||
}
|
}
|
||||||
|
|
||||||
agent_card_free_keyinfo (keyinfo_on_cards);
|
agent_card_free_keyinfo (keyinfo_on_cards);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user