provider: return error if buf too small when getting ec pubkey param
authorYi Li <yi1.li@intel.com>
Fri, 5 May 2023 03:30:05 +0000 (11:30 +0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 12 May 2023 08:34:40 +0000 (10:34 +0200)
commit3a361c68a4493b03b9283f7f11372ef357aad910
tree1e359bd32c5389bb56ae3705a7992770860336f7
parent69987f93976fc83b6250cabb1b6198803ac1f308
provider: return error if buf too small when getting ec pubkey param

Fixes #20889

There was an incorrect value passed to EC_POINT_point2oct() for the
buffer size of the param passed-in.

Added testcases.

Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20890)

(cherry picked from commit 91070877adb905f51eb4b19b730d42fc257bae13)
providers/implementations/keymgmt/ec_kmgmt.c
test/evp_extra_test.c