]> git.ipfire.org Git - thirdparty/openssl.git/commit - crypto/evp/p_lib.c
EVP: Add evp_pkey_make_provided() and refactor around it
authorRichard Levitte <levitte@openssl.org>
Tue, 14 Jan 2020 13:11:47 +0000 (14:11 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 18 Jan 2020 04:27:50 +0000 (05:27 +0100)
commitf6aa57741254723b0c32f0dfe1ed8ad886b43c80
tree203488625e054b4f1624066a87d428c0a8568c7d
parentc8a557357789a8a23fe7b87ec352bd5ea2c1251b
EVP: Add evp_pkey_make_provided() and refactor around it

The code to ensure that an EVP_PKEY is exported to providers is
repeated all over the place, enough that copying it again has the
usual future hazards with code copying.

Instead, we refactor that code into one function,
evp_pkey_make_provided(), and make sure to use that everywhere.
It relies on the creation of EVP_PKEY_CTX to figure out facts about
the input key, should it need to.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10850)
crypto/evp/evp_local.h
crypto/evp/exchange.c
crypto/evp/m_sigver.c
crypto/evp/p_lib.c
crypto/evp/pmeth_fn.c
crypto/evp/signature.c
doc/internal/man3/evp_pkey_make_provided.pod [new file with mode: 0644]