[git] KSBA - branch, master, updated. libksba-1.3.3-4-g3d968bb
by Werner Koch
cvs at cvs.gnupg.org
Wed Oct 28 11:45:35 CET 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "KSBA is a library to access X.509 certificates and CMS data.".
The branch, master has been updated
via 3d968bbffc3a0acda890e342fbbfa5b34a26085e (commit)
via 9df0ac3a4afa0272dbff08d17e9064f13be95814 (commit)
from 538188812ace9594aad92a9b0f73b75e5ffc4526 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3d968bbffc3a0acda890e342fbbfa5b34a26085e
Author: Werner Koch <wk at gnupg.org>
Date: Wed Oct 28 11:41:25 2015 +0100
Add more curves to the name->OID table.
* src/keyinfo.c (curve_names): Add more curves.
--
This aligns the table with the one used in libgcrypt master. Note
that the GOST2001-CryptoPro-{A,C} curves have two different OIDs; we
can only support one.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/src/keyinfo.c b/src/keyinfo.c
index 3ea0cfa..265b475 100644
--- a/src/keyinfo.c
+++ b/src/keyinfo.c
@@ -230,19 +230,30 @@ static const struct
const char *name;
} curve_names[] =
{
+ { "1.3.6.1.4.1.3029.1.5.1", "Curve25519" },
+ { "1.3.6.1.4.1.11591.15.1", "Ed25519" },
+
{ "1.2.840.10045.3.1.1", "NIST P-192" },
+ { "1.2.840.10045.3.1.1", "nistp192" },
{ "1.2.840.10045.3.1.1", "prime192v1" },
{ "1.2.840.10045.3.1.1", "secp192r1" },
- { "1.3.132.0.33", "secp224r1" },
+ { "1.3.132.0.33", "NIST P-224" },
+ { "1.3.132.0.33", "nistp224" },
+ { "1.3.132.0.33", "secp224r1" },
- { "1.2.840.10045.3.1.7", "NIST P-256", },
+ { "1.2.840.10045.3.1.7", "NIST P-256" },
+ { "1.2.840.10045.3.1.7", "nistp256" },
{ "1.2.840.10045.3.1.7", "prime256v1" },
{ "1.2.840.10045.3.1.7", "secp256r1" },
- { "1.3.132.0.34", "secp384r1" },
+ { "1.3.132.0.34", "NIST P-384" },
+ { "1.3.132.0.34", "nistp384" },
+ { "1.3.132.0.34", "secp384r1" },
- { "1.3.132.0.35", "secp521r1" },
+ { "1.3.132.0.35", "NIST P-521" },
+ { "1.3.132.0.35", "nistp521" },
+ { "1.3.132.0.35", "secp521r1" },
{ "1.3.36.3.3.2.8.1.1.1" , "brainpoolP160r1" },
{ "1.3.36.3.3.2.8.1.1.3" , "brainpoolP192r1" },
@@ -252,6 +263,15 @@ static const struct
{ "1.3.36.3.3.2.8.1.1.11", "brainpoolP384r1" },
{ "1.3.36.3.3.2.8.1.1.13", "brainpoolP512r1" },
+
+ { "1.2.643.2.2.35.1", "GOST2001-CryptoPro-A" },
+ { "1.2.643.2.2.35.2", "GOST2001-CryptoPro-B" },
+ { "1.2.643.2.2.35.3", "GOST2001-CryptoPro-C" },
+ { "1.2.643.7.1.2.1.2.1", "GOST2012-tc26-A" },
+ { "1.2.643.7.1.2.1.2.2", "GOST2012-tc26-B" },
+
+ { "1.3.132.0.10", "secp256k1" },
+
{ NULL, NULL}
};
commit 9df0ac3a4afa0272dbff08d17e9064f13be95814
Author: Werner Koch <wk at gnupg.org>
Date: Wed Oct 28 11:18:59 2015 +0100
Fix lookup of ECC OIDs by name.
* src/keyinfo.c (get_ecc_curve_oid): Fix obviously never tested table
lookup.
--
This led to a crash see
https://lists.gnupg.org/pipermail/gnupg-devel/2015-October/030445.html
The fix is obvious but I do not have test data for this.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/src/keyinfo.c b/src/keyinfo.c
index 02dc7ae..3ea0cfa 100644
--- a/src/keyinfo.c
+++ b/src/keyinfo.c
@@ -322,10 +322,10 @@ get_ecc_curve_oid (const unsigned char *buf, size_t buflen, size_t *r_oidlen)
if (buflen == strlen (curve_names[i].name)
&& !memcmp (buf, curve_names[i].name, buflen))
break;
- if (curve_names[i].oid)
+ if (!curve_names[i].oid)
return NULL; /* Not found. */
- buf = curve_names[i].name;
- buflen = strlen (curve_names[i].name);
+ buf = curve_names[i].oid;
+ buflen = strlen (curve_names[i].oid);
}
if (_ksba_oid_from_buf (buf, buflen, &der_oid, r_oidlen))
-----------------------------------------------------------------------
Summary of changes:
src/keyinfo.c | 34 +++++++++++++++++++++++++++-------
1 file changed, 27 insertions(+), 7 deletions(-)
hooks/post-receive
--
KSBA is a library to access X.509 certificates and CMS data.
http://git.gnupg.org
More information about the Gnupg-commits
mailing list