scd: Don't inhibit SSH authentication for larger data if it can.

* scd/app-openpgp.c (do_auth): Use command chaining if available.

--

GnuPG-bug-id: 5935
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2022-04-22 11:50:19 +09:00
parent 60fc743da4
commit e8fb8e2b3e
1 changed files with 5 additions and 0 deletions

View File

@ -5490,6 +5490,11 @@ 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 (app->app_local->cardcap.cmd_chaining && indatalen > 254)
{
exmode = -254; /* Command chaining with max. 254 bytes. */
le_value = 0;
}
else if (indatalen > 255)
{
if (!app->app_local->cardcap.ext_lc_le)