mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 04:34:41 +02:00
Fix ECC sign with custom curves so the custom params (dp) are passed to public key used for sign.
This commit is contained in:
@@ -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 */
|
/* 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) {
|
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 (;;) {
|
for (;;) {
|
||||||
if (++loop_check > 64) {
|
if (++loop_check > 64) {
|
||||||
err = RNG_FAILURE_E;
|
err = RNG_FAILURE_E;
|
||||||
|
Reference in New Issue
Block a user