Fix the export routines to not return success if param alloc failed
authorMatt Caswell <matt@openssl.org>
Thu, 9 Jun 2022 11:02:37 +0000 (12:02 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 15 Jun 2022 10:47:46 +0000 (11:47 +0100)
commit46c1c2d7fa9153da4eb5e1aefd7b0139dc507c00
treea699f6f65d3c318aa2f0a85feb3d6d2db95744f0
parent08e0aad293f1c283dccf7e9065ec28af5e143304
Fix the export routines to not return success if param alloc failed

We fix the dsa, dh, ec and rsa export routines so that they are
consistent with each other and do not report success if the allocation
of parameters failed.

This is essentially the same fix as applied in #18483 but applied to all
relevant key types.

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