aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2021-03-08 07:23:26 +0000
committerNIIBE Yutaka <[email protected]>2021-03-08 07:23:26 +0000
commitfc99f77b14b6c2cdfb547607651922c16863dcf0 (patch)
treeb63e1633db8538d76a52e23f432ac25a538bf737 /scd/app-openpgp.c
parentw32: Always use Unicode for console input and output. (diff)
downloadgnupg-fc99f77b14b6c2cdfb547607651922c16863dcf0.tar.gz
gnupg-fc99f77b14b6c2cdfb547607651922c16863dcf0.zip
scd: Fix for X448.
* scd/app-openpgp.c (do_decipher): Support with no prefix. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 6a0703f03..cd4b9426e 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -5537,6 +5537,8 @@ do_decipher (app_t app, ctrl_t ctrl, const char *keyidstr,
if (app->app_local->keyattr[1].ecc.flags & ECC_FLAG_DJB_TWEAK)
prefix = 0x40;
+ else if (*outdatalen == 56) /* It's X448 with no prefix. */
+ ;
else if ((*outdatalen % 2) == 0) /* No 0x04 -> x-coordinate only */
prefix = 0x41;