diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2021-11-15 03:40:41 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2021-11-15 03:40:41 +0100 |
commit | a575b0aba5424ed76b1067218beab748b56bde43 (patch) | |
tree | e777affce0a3fe89286d4c76696618f10e4f0a60 | |
parent | agent: Print the non-option warning earlier. (diff) | |
download | gnupg2-a575b0aba5424ed76b1067218beab748b56bde43.tar.xz gnupg2-a575b0aba5424ed76b1067218beab748b56bde43.zip |
scd:openpgp: Support longer data for INTERNAL_AUTHENTICATE.
* scd/app-openpgp.c (do_auth): Use extended Lc, when supported.
--
GnuPG-bug-id: 5682
Co-authored-by: Klas Lindfors
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r-- | scd/app-openpgp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index e1ceed4bc..76a15d00e 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -5418,6 +5418,14 @@ do_auth (app_t app, ctrl_t ctrl, const char *keyidstr, exmode = 1; /* Use extended length. */ le_value = app->app_local->keyattr[2].rsa.n_bits / 8; } + else if (indatalen > 255) + { + if (!app->app_local->cardcap.ext_lc_le) + return gpg_error (GPG_ERR_TOO_LARGE); + + exmode = 1; + le_value = 0; + } else { exmode = 0; |