Fix ECC sign with custom curves so the custom params (dp) are passed to public key used for sign.
This commit is contained in:
parent
f147b01674
commit
5180cf4cce
@ -3538,6 +3538,13 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng,
|
||||
|
||||
/* don't use async for key, since we don't support async return here */
|
||||
if (wc_ecc_init_ex(&pubkey, key->heap, INVALID_DEVID) == MP_OKAY) {
|
||||
#ifdef WOLFSSL_CUSTOM_CURVES
|
||||
/* if custom curve, apply params to pubkey */
|
||||
if (key->idx == ECC_CUSTOM_IDX) {
|
||||
wc_ecc_set_custom_curve(&pubkey, key->dp);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (;;) {
|
||||
if (++loop_check > 64) {
|
||||
err = RNG_FAILURE_E;
|
||||
|
Loading…
x
Reference in New Issue
Block a user