openssl/include/crypto
Richard Levitte 5246183e7a EVP: Reverse the fetch logic in all pkey using functionality
In all initializing functions for functionality that use an EVP_PKEY, the
coded logic was to find an KEYMGMT implementation first, and then try to
find the operation method (for example, SIGNATURE implementation) in the
same provider.

This implies that in providers where there is a KEYMGMT implementation,
there must also be a SIGNATURE implementation, along with a KEYEXCH,
ASYM_CIPHER, etc implementation.

The intended design was, however, the opposite implication, i.e. that
where there is a SIGNATURE implementation, there must also be KEYMGMT.

This change reverses the logic of the code to be closer to the intended
design.

There is a consequence; we now use the query_operation_name function from
the KEYMGMT of the EVP_PKEY given by the EVP_PKEY_CTX (ultimately given by
the application).  Previously, we used the query_operation_name function
from the KEYMGMT found alongside the SIGNATURE implementation.

Another minor consequence is that the |keymgmt| field in EVP_PKEY_CTX
is now always a reference to the KEYMGMT of the |pkey| field if that
one is given (|pkey| isn't NULL) and is provided (|pkey->keymgmt|
isn't NULL).

Fixes #16614

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16725)
2021-10-27 12:41:12 +02:00
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
aes_platform.h aes_v8_xts_encrypt is present only on 64bit arm builds 2021-08-11 10:08:57 +02:00
aria.h Add ossl_aria symbols 2021-03-18 17:52:37 +10:00
asn1_dsa.h Add ossl_encode symbols 2021-03-18 17:52:37 +10:00
asn1.h Add support for ISO 8601 datetime format 2021-06-11 12:39:46 +02:00
asn1err.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
async.h
asyncerr.h Update copyright year 2021-06-17 13:24:59 +01:00
bioerr.h Update copyright year 2021-06-17 13:24:59 +01:00
bn_conf.h.in
bn_dh.h Update copyright year 2021-03-11 13:27:36 +00:00
bn_srp.h Update copyright year 2021-04-08 13:04:41 +01:00
bn.h
bnerr.h Update copyright year 2021-06-17 13:24:59 +01:00
buffererr.h Update copyright year 2021-06-17 13:24:59 +01:00
chacha.h
cmll_platform.h Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
cmperr.h Update copyright year 2021-06-17 13:24:59 +01:00
cmserr.h Update copyright year 2021-06-17 13:24:59 +01:00
comperr.h Update copyright year 2021-06-17 13:24:59 +01:00
conferr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
crmferr.h Update copyright year 2021-06-17 13:24:59 +01:00
cryptlib.h Fix a memleak in the FIPS provider 2021-05-24 09:39:15 +10:00
cryptoerr.h Update copyright year 2021-06-17 13:24:59 +01:00
cterr.h Update copyright year 2021-06-17 13:24:59 +01:00
ctype.h Add ossl_asn1 symbols 2021-03-18 17:52:37 +10:00
decoder.h Refactor OSSL_DECODER_do_all_provided() to behave like OSSL_DECODER_fetch() 2021-06-15 16:21:31 +02:00
decodererr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
des_platform.h Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
dh.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
dherr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
dsa.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
dsaerr.h Update copyright year 2021-06-17 13:24:59 +01:00
dso_conf.h.in
ec.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
ecerr.h rand: use size_t for size argument to RAND_bytes_ex() 2021-06-01 18:13:36 +10:00
ecx.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
encoder.h Update copyright year 2021-06-17 13:24:59 +01:00
encodererr.h Update copyright year 2021-06-17 13:24:59 +01:00
engine.h
engineerr.h Update copyright year 2021-06-17 13:24:59 +01:00
err.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
ess.h TS ESS: Move four internal aux function to where they belong in crypto/ts 2021-04-28 14:10:47 +02:00
esserr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
evp.h EVP: Reverse the fetch logic in all pkey using functionality 2021-10-27 12:41:12 +02:00
evperr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
httperr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
lhash.h Add ossl_lhash symbols 2021-03-18 17:52:38 +10:00
md32_common.h
modes.h Update copyright year 2021-03-11 13:27:36 +00:00
objects.h Update copyright year 2021-04-08 13:04:41 +01:00
objectserr.h Update copyright year 2021-06-17 13:24:59 +01:00
ocsperr.h Update copyright year 2021-06-17 13:24:59 +01:00
pem.h Pass library context and property query into private key decoders 2021-06-01 12:16:27 +02:00
pemerr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
pkcs7.h Add library context and property query support into the PKCS12 API 2021-04-30 09:15:50 +10:00
pkcs7err.h Update copyright year 2021-06-17 13:24:59 +01:00
pkcs12err.h Update copyright year 2021-06-17 13:24:59 +01:00
poly1305.h
ppc_arch.h Update copyright year 2021-07-29 15:41:35 +01:00
punycode.h punycode: fix indentation 2021-06-19 15:54:06 +10:00
rand_pool.h Add ossl_rand symbols 2021-03-18 17:52:37 +10:00
rand.h MacOS prior to 10.12 does not support random API correctly 2021-09-14 14:50:39 +02:00
randerr.h Update copyright year 2021-06-17 13:24:59 +01:00
rsa.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
rsaerr.h errors: update error message (to be squashed) 2021-05-27 13:01:50 +10:00
security_bits.h Fix misc external ossl_ symbols. 2021-03-18 17:52:37 +10:00
sha.h Crypto: Add deprecation compatibility declarations for SHA* message digest functions 2021-05-08 14:41:36 +02:00
siphash.h Fix a TODO(3.0) in the siphash code 2021-03-17 10:16:21 +10:00
siv.h Update copyright year 2021-04-08 13:04:41 +01:00
sm2.h Correctly calculate the length of SM2 plaintext given the ciphertext 2021-08-24 14:22:07 +01:00
sm2err.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
sm4.h Add ossl_ symbols for sm3 and sm4 2021-03-18 17:52:37 +10:00
sparc_arch.h Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
sparse_array.h Add ossl_sa symbols 2021-03-18 17:52:37 +10:00
store.h Add internal get_number functions to internal headers 2021-06-02 20:45:39 +10:00
storeerr.h err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
tserr.h Update copyright year 2021-06-17 13:24:59 +01:00
types.h Added guarding #ifndef/#define to avoid duplicate include of crypto/types.h 2021-03-31 13:28:46 +10:00
uierr.h Update copyright year 2021-06-17 13:24:59 +01:00
x509.h cpp: fix included files to avoid failure in no-deprecated builds 2021-08-25 10:47:21 +10:00
x509err.h Update copyright year 2021-06-17 13:24:59 +01:00
x509v3err.h Update copyright year 2021-06-17 13:24:59 +01:00