X-Git-Url: https://bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Fec%2Fecdsa_i31_vrfy_raw.c;h=259477fdb8fcee11169459cb436f00da81a28b2f;hp=54dcfc2dfea69f2b5a2d8a417ba5144e81c84ebb;hb=2f9c953af45299f8546df8984d5262e767a7d943;hpb=3210f38e0491b39aec1ef419cb4114e9483089fb diff --git a/src/ec/ecdsa_i31_vrfy_raw.c b/src/ec/ecdsa_i31_vrfy_raw.c index 54dcfc2..259477f 100644 --- a/src/ec/ecdsa_i31_vrfy_raw.c +++ b/src/ec/ecdsa_i31_vrfy_raw.c @@ -47,6 +47,13 @@ br_ecdsa_i31_vrfy_raw(const br_ec_impl *impl, size_t nlen, rlen, ulen; uint32_t n0i, res; + /* + * If the curve is not supported, then report an error. + */ + if (((impl->supported_curves >> pk->curve) & 1) == 0) { + return 0; + } + /* * Get the curve parameters (generator and order). */ @@ -137,7 +144,7 @@ br_ecdsa_i31_vrfy_raw(const br_ec_impl *impl, */ ulen = cd->generator_len; memcpy(eU, pk->q, ulen); - res = impl->muladd(eU, cd->generator, ulen, + res = impl->muladd(eU, NULL, ulen, tx, nlen, ty, nlen, cd->curve); /*