PROV: Fix EC_KEY exporters to allow domain parameter keys
authorRichard Levitte <levitte@openssl.org>
Tue, 24 Mar 2020 15:31:43 +0000 (16:31 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 27 Mar 2020 11:49:17 +0000 (12:49 +0100)
commit9e2c03582de42e8ac5aa23412affcb9645395e94
tree09fb597bec213e80ca2590de07f01d78a0879ace
parent4c106e20ef49b789e4dc53c97e0f9a701162be85
PROV: Fix EC_KEY exporters to allow domain parameter keys

The provider key export functions for EC_KEY assumed that a public key
is always present, and would fail if not.  This blocks any attempt to
export a key structure with only domain parameters.

This is similar to earlier work done in EVP_PKEY_ASN1_METHODs.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11394)
crypto/ec/ec_backend.c
providers/implementations/keymgmt/ec_kmgmt.c