mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
ECC, ALT_ECC_SIZE, CryptoCB: ensure err is 0 in _ecc_make_key_ex
When CryptoCB is used and the key gen operation is not implemented, err is CRYPTOCB_UNAVAILABLE and needs to be reset to 0.
This commit is contained in:
@ -5612,6 +5612,7 @@ static int _ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key,
|
||||
#ifndef ALT_ECC_SIZE
|
||||
err = mp_init(key->k);
|
||||
#else
|
||||
err = 0;
|
||||
key->k = (mp_int*)key->ka;
|
||||
alt_fp_init(key->k);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user