openssl/util
Richard Levitte 839ffdd11c EVP: Allow a fallback for operations that work with an EVP_PKEY
Functions like EVP_PKEY_sign_init() do an implicit fetch of the
operation implementation (EVP_SIGNATURE in this case), then get the
KEYMGMT from the same provider, and tries to export the key there if
necessary.

If an export of the key isn't possible (because the provider that
holds the key is an HSM and therefore can't export), we would simply
fail without looking any further.

This change modifies the behaviour a bit by trying a second fetch of
the operation implementation, but specifically from the provider of
the EVP_PKEY that's being used.  This is done with the same properties
that were used with the initial operation implementation fetch, and
should therefore be safe, allowing only what those properties allow.

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:13 +02:00
..
perl OpenSSL::Ordinals::set_version() should only be given the short version 2021-09-09 12:07:33 +02:00
add-depends.pl util/add-depends.pl: Rebuild the build file after reconfiguration 2021-08-19 20:45:00 +02:00
build.info Make util/wrap.pl work better on VMS 2021-06-18 09:08:16 +02:00
c-compress-test.pl FIPS module checksums: add scripts and Makefile rule 2021-05-04 11:32:16 +02:00
cavs-to-evptest.pl Add the NIST CAVS test vectors for CCM 2019-05-23 10:49:54 +01:00
check-format-test-negatives.c check-format.pl: Allow extra space before end-of-line comments unless -e|--eol-cmt given 2021-05-20 16:29:13 +02:00
check-format-test-positives.c check-format.pl: Rename 'one-letter' to 'single-letter', do not report 'l' 2021-05-20 16:29:13 +02:00
check-format.pl always use the same perl in $PATH 2021-09-02 12:55:39 +10:00
check-malloc-errs Following the license change, modify the boilerplates in util/, tools/ 2018-12-06 14:17:23 +01:00
ck_errf.pl Create provider errors and use them 2019-04-19 09:31:54 +01:00
copy.pl Following the license change, modify the boilerplates in util/, tools/ 2018-12-06 14:17:23 +01:00
dofile.pl configdata.pm.in, util/dofile.pl: Make a HERE document stricter. 2020-10-27 10:17:19 +01:00
echo.pl always use the same perl in $PATH 2021-09-02 12:55:39 +10:00
engines.num Change the build of engines to use ordinal files for symbol export 2018-10-05 08:22:42 +02:00
err-to-raise Simplify util/err-to-raise 2020-11-18 11:40:52 +01:00
find-doc-nits doc-nits: support out of source execution 2021-06-08 18:55:32 +10:00
find-unused-errs Following the license change, modify the boilerplates in util/, tools/ 2018-12-06 14:17:23 +01:00
fips-checksums.sh always use the same perl in $PATH 2021-09-02 12:55:39 +10:00
fix-deprecation always use the same perl in $PATH 2021-09-02 12:55:39 +10:00
fix-includes Update copyright year 2020-04-23 13:55:52 +01:00
fix-includes.sed CRYPTO: split cipher_platform.h into algorithm specific headers 2019-12-19 13:31:29 +01:00
indent.pro Deprecate OCSP_xxx API for OSSL_HTTP_xxx 2021-01-19 11:13:15 +01:00
lang-compress.pl util: update FIPS checksumming script to be more aggressive with whitespace 2021-06-03 11:56:21 +10:00
libcrypto.num make update 2021-07-29 15:50:27 +01:00
libssl.num Add ordinal numbers to the .num files 2021-05-20 16:25:06 +01:00
local_shlib.com.in Configuration: Fix incorrect $unified_info{attributes} references 2021-06-16 14:47:39 +01:00
markdownlint.rb util/markdownlint.rb: Add two rule exceptions: MD023 and MD026 2020-07-05 11:29:43 +02:00
merge-err-lines Add merge-err-lines script 2019-09-19 09:27:38 -04:00
missingcrypto111.txt Cleanup the missing*.txt files 2021-05-21 11:03:37 +02:00
missingcrypto-internal.txt STORE: Move the built-in 'file:' loader to become an engine module 2020-09-03 17:48:32 +02:00
missingcrypto.txt Add documentation for the newly added OBJ up calls 2021-06-16 15:04:50 +10:00
missingmacro111.txt Document some SSL DH related functions/macros 2020-11-18 14:14:53 +00:00
missingmacro.txt Cleanup the missing*.txt files 2021-05-21 11:03:37 +02:00
missingssl111.txt Adjust all util/missing*.txt to include the section number 2019-12-21 22:53:54 +01:00
missingssl-internal.txt Initialize files that declare internal symbols 2020-04-11 15:51:43 +02:00
missingssl.txt Adjust all util/missing*.txt to include the section number 2019-12-21 22:53:54 +01:00
mk-fipsmodule-cnf.pl Rework how providers/fipsmodule.cnf is produced 2021-05-26 15:11:01 +02:00
mkbuildinf.pl Following the license change, modify the boilerplates in util/, tools/ 2018-12-06 14:17:23 +01:00
mkdef.pl Update copyright year 2021-04-22 14:38:44 +01:00
mkdir-p.pl Update copyright year 2021-04-08 13:04:41 +01:00
mkerr.pl mkerr: Fix string literal conversion 2021-05-28 14:22:45 +02:00
mknum.pl Ensure ordinals are created during release process 2021-06-29 09:51:30 +10:00
mkpod2html.pl Fix util/mkpod2html.pl to call pod2html with absolute paths 2021-09-21 11:05:53 +02:00
mkrc.pl util/mkrc.pl: Make sure FILEVERSION and PRODUCTVERSION have four numbers 2020-11-17 13:18:16 +01:00
mktar.sh Simplify the tarball generating scripts 2020-09-24 08:03:00 +02:00
opensslwrap.sh util/opensslwrap.sh: adjust to define OPENSSL_MODULES as well 2019-07-15 16:14:35 +02:00
other-internal.syms Suppress errors about undocumented asn1_d2i_read_bio 2021-02-22 12:11:38 +00:00
other.syms EVP: Allow a fallback for operations that work with an EVP_PKEY 2021-10-27 12:41:13 +02:00
providers.num Add provider module infrastructure 2019-03-11 20:40:13 +01:00
shlib_wrap.sh.in Add explicit support in util/shlib_wrap.sh.in for NonStop DLL loading. 2021-03-30 19:08:32 +02:00
su-filter.pl Following the license change, modify the boilerplates in util/, tools/ 2018-12-06 14:17:23 +01:00
unlocal_shlib.com.in Configuration: Fix incorrect $unified_info{attributes} references 2021-06-16 14:47:39 +01:00
withlibctx.pl Perl util to do with_libctx renaming 2020-10-01 09:23:05 +01:00
wrap.pl.in util: add -fips option to wrap.pl to make using the FIPS provider easier 2021-07-06 18:14:08 +10:00
write-man-symlinks write-man-symlinks: Write relative symlinks not absolute 2021-05-25 17:14:09 +02:00