From 07e43eda8dc69cecc385a6b3723e155afbc59257 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 22 Apr 2022 11:50:19 +0900 Subject: [PATCH] scd: Don't inhibit SSH authentication for larger data if it can. * scd/app-openpgp.c (do_auth): Use command chaining if available. -- Cherry-picked from master branch of: e8fb8e2b3e66d5ea8a3dc90afdc14611abf2c3da GnuPG-bug-id: 5935 Signed-off-by: NIIBE Yutaka --- scd/app-openpgp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index c65d6b198..c7d2c383e 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -4738,6 +4738,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)