[Cryptech-Commits] [sw/libhal] 03/11: Consolidating curve names broke the ASN.1 code.

git at cryptech.is git at cryptech.is
Wed Dec 23 07:22:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch rpc
in repository sw/libhal.

commit 0336850c447ee44c21383ffb7df416ce1623378b
Author: Rob Austein <sra at hactrn.net>
Date:   Sun Dec 20 20:04:51 2015 -0500

    Consolidating curve names broke the ASN.1 code.
---
 ecdsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ecdsa.c b/ecdsa.c
index 10c2ba2..c568a74 100644
--- a/ecdsa.c
+++ b/ecdsa.c
@@ -1248,7 +1248,7 @@ hal_error_t hal_ecdsa_key_from_der(hal_ecdsa_key_t **key_,
   if ((err = hal_asn1_decode_header(ASN1_OBJECT_IDENTIFIER, d, vlen, &hlen, &vlen)) != HAL_OK)
     return err;
   d += hlen;
-  for (key->curve = (hal_curve_name_t) 0; (curve = get_curve(key->curve)) != NULL; key->curve++)
+  for (key->curve = HAL_CURVE_NONE; (curve = get_curve(++key->curve)) != NULL; )
     if (vlen == curve->oid_len && memcmp(d, curve->oid, vlen) == 0)
       break;
   if (curve == NULL)



More information about the Commits mailing list