From 8cde26a6c5eb82667c22088abb4d471c6a4e8624 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Mon, 3 Apr 2017 09:50:46 -0600 Subject: [PATCH] fix curve selection on ecc private only import --- wolfcrypt/src/ecc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 3ba711b28..4e96ebc2f 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -4882,7 +4882,7 @@ int wc_ecc_import_private_key_ex(const byte* priv, word32 privSz, return ret; /* set key size */ - ret = wc_ecc_set_curve(key, privSz-1, curve_id); + ret = wc_ecc_set_curve(key, privSz, curve_id); } if (ret != 0)