[Pkg-gnupg-commit] [gnupg2] 120/292: scd: Fix keytocard for ECC.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Nov 21 06:31:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 25428be52168fa9c581b7f11c95a5c63b25343b7
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Mon Oct 17 12:02:28 2016 +0900
scd: Fix keytocard for ECC.
* scd/app-openpgp.c (build_ecc_privkey_template): Size can be greater
than 128 when it comes with public key for curve of larger field.
--
Reported-by: Arnaud Fontaine <arnaud.fontaine at ssi.gouv.fr>
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
scd/app-openpgp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 563a045..ef335fe 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -2689,6 +2689,8 @@ build_ecc_privkey_template (app_t app, int keyno,
+ privkey_len
+ suffix_len
+ datalen);
+ if (exthdr_len + privkey_len + suffix_len + datalen >= 128)
+ template_size++;
tp = template = xtrymalloc_secure (template_size);
if (!template)
return gpg_error_from_syserror ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list