aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-12-20 20:04:51 -0500
committerRob Austein <sra@hactrn.net>2015-12-20 20:04:51 -0500
commit0336850c447ee44c21383ffb7df416ce1623378b (patch)
tree45267a8b0f4dc006035ecc949110b74421238ba6
parente3f62b04be54fda0fddc7d9ee5e09441d1651c21 (diff)
Consolidating curve names broke the ASN.1 code.
-rw-r--r--ecdsa.c2
1 files changed, 1 insertions, 1 deletions
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)