EVP: Adapt EVP_PKEY_{set1,get1}_encoded_public_key()
authorRichard Levitte <levitte@openssl.org>
Wed, 3 Feb 2021 15:48:21 +0000 (16:48 +0100)
committerPauli <ppzgs1@gmail.com>
Fri, 5 Feb 2021 05:53:49 +0000 (15:53 +1000)
commit76624df15fef0725f28a8b9d0f31256946669b1a
tree142a6e1dd458a7dc3873e382e1b1edcffa6cdd7a
parentd82c7f3dba44b190eac80e5ddffac9a00cefd47d
EVP: Adapt EVP_PKEY_{set1,get1}_encoded_public_key()

These functions are modified to use EVP_PKEY_set_octet_string_param()
and EVP_PKEY_get_octet_string_param() instead of evp_keymgmt_set_params()
and evp_keymgmt_get_params().
To accomplish this fully, EVP_PKEY_get_octet_string_param() is changed
slightly to populate |*out_sz| with the return size, even if getting
the params resulted in an error.

We also modify EVP_PKEY_get_utf8_string_param() to match
EVP_PKEY_get_octet_string_param()

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14056)
crypto/evp/p_lib.c
doc/man3/EVP_PKEY_gettable_params.pod