Fix issue with imported key not having a reset key->r, key->s and key->state, which was causing wc_ecc_encrypt to fail.

This commit is contained in:
David Garske
2016-12-30 12:24:03 -08:00
parent 6cc1fd293e
commit 07ce995b12

View File

@@ -4364,6 +4364,9 @@ int wc_ecc_import_x963_ex(const byte* in, word32 inLen, ecc_key* key,
return ECC_BAD_ARG_E;
}
XMEMSET(key, 0, sizeof(ecc_key));
key->state = ECC_STATE_NONE;
#ifdef WOLFSSL_ATECC508A
/* TODO: Implement equiv call to ATECC508A */
err = BAD_COND_E;