diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index bd3d117fa..3a894b37b 100755 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -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;