agent: Fix regression in 'd' fixup code for shadowed keys.

* agent/sexp-secret.c (fixup_when_ecc_private_key): Ignore shadowed
keys.
--

Fixes-commit: 47c1c329ed
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-06-17 15:05:53 +02:00
parent 596212e71a
commit d1e1c622d5
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ fixup_when_ecc_private_key (unsigned char *buf, size_t *buflen_p)
n = snext (&s);
if (!n)
return gpg_error (GPG_ERR_INV_SEXP);
if (smatch (&s, n, "shadowed-private-key"))
return 0; /* Nothing to do. */
if (!smatch (&s, n, "private-key"))
return gpg_error (GPG_ERR_UNKNOWN_SEXP);
if (*s != '(')