EVP: make EVP_PKEY_{bits,security_bits,size} work with provider only keys
authorRichard Levitte <levitte@openssl.org>
Wed, 8 Jan 2020 02:44:28 +0000 (03:44 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 17 Jan 2020 08:04:04 +0000 (09:04 +0100)
commit6508e858836020622efff5dd4be3fa4530d1584b
treeec7f0d78108dadd5762d07cc373f67af5a931464
parente4a1d0230016d090ba78bc7092384315f85b0e72
EVP: make EVP_PKEY_{bits,security_bits,size} work with provider only keys

These functions relied entirely on the presence of 'pkey->pmeth',
which is NULL on provider only keys.  This adds an interface to get
domparam and key data from a provider, given corresponding provider
data (the actual domparam or key).

The retrieved data is cached in the EVP_PKEY structure (lending the
idea from provided EVP_CIPHER).

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/10778)
crypto/evp/evp_local.h
crypto/evp/keymgmt_lib.c
crypto/evp/keymgmt_meth.c
crypto/evp/p_lib.c
doc/man7/provider-keymgmt.pod
include/crypto/evp.h
include/openssl/core_names.h
include/openssl/core_numbers.h