Don't report success from ec_export if OSSL_PARAM_BLD_to_param failed
authorMatt Caswell <matt@openssl.org>
Mon, 6 Jun 2022 09:32:49 +0000 (10:32 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 8 Jun 2022 14:43:44 +0000 (15:43 +0100)
commit7d6aad832b4cebb181c53ab80a3f61dc8549be08
tree139a3dc9efba5a964a7e4266acd9729c24587db5
parentae4d9573ac783dcf26279f461d42d0e261e978f7
Don't report success from ec_export if OSSL_PARAM_BLD_to_param failed

If the call to OSSL_PARAM_BLD_to_param() failed then ec_export was
reporting success, even though it has never called the param_cb.

Found due to:
https://github.com/openssl/openssl/pull/18355#issuecomment-1145993650

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18483)
providers/implementations/keymgmt/ec_kmgmt.c