openssl/crypto/ec
Richard Levitte df13defd4f EVP: Check that key methods aren't foreign when exporting
The EVP_PKEY_ASN1_METHOD function export_to() must check that the key
we're trying to export has a known libcrypto method, i.e. is a built
in RSA_METHOD, DSA_METHOD, etc.  Otherwise, the method may be defined
by the calling application, by an engine, by another library, and we
simply cannot know all the quirks hidden behind that method, if we
have access to the key data, or much anything.

Such keys are simply deemed impossible to export to provider keys,
i.e. have export_to() return 0.  This cascades back to functions like
evp_pkey_export_to_provider() and evp_pkey_upgrade_to_provider() and
their callers.  In most cases, this is fine, but if these get mixed in
with provider side keys in any function, that function will fail.

Fixes #11179
Fixes #9915

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11193)
2020-03-09 10:54:01 +01:00
..
asm Also check for errors in x86_64-xlate.pl. 2020-02-17 12:17:53 +10:00
curve448 Implement provider support for Ed25519 annd Ed448 2020-03-09 07:59:15 +00:00
build.info [PROV][KMGMT][KEXCH][EC] Implement EC keymgtm and ECDH 2020-02-18 19:11:10 +02:00
curve25519.c Implement a stricter ECX_KEY type 2020-02-11 22:32:47 +00:00
ec2_oct.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec2_smpl.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_ameth.c EVP: Check that key methods aren't foreign when exporting 2020-03-09 10:54:01 +01:00
ec_asn1.c [PROV][KMGMT][KEXCH][EC] Implement EC keymgtm and ECDH 2020-02-18 19:11:10 +02:00
ec_check.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_curve.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_cvt.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_err.c util/mkerr.pl: make it not depend on the function code 2019-09-12 17:59:52 +02:00
ec_evp_lib.c [PROV][KMGMT][KEXCH][EC] Implement EC keymgtm and ECDH 2020-02-18 19:11:10 +02:00
ec_key.c Add pairwise consistency self tests to asym keygenerators 2020-03-03 14:02:36 +10:00
ec_kmeth.c Deprecate the ECDH functions. 2020-02-04 20:02:55 +10:00
ec_lib.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_local.h Implement provider support for Ed25519 annd Ed448 2020-03-09 07:59:15 +00:00
ec_mult.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_oct.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ec_pmeth.c Deprecate the ECDH functions. 2020-02-04 20:02:55 +10:00
ec_print.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecdh_kdf.c Params: change UTF8 construct calls to avoid explicit strlen(3) calls. 2020-02-06 16:22:00 +10:00
ecdh_ossl.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecdsa_ossl.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecdsa_sign.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecdsa_vrf.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
eck_prn.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_mont.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_nist.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_nistp224.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_nistp256.c Fix comment placement in ecp_nistp256.ci 2020-02-28 00:39:18 +01:00
ecp_nistp521.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_nistputil.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_nistz256_table.c Following the license change, modify the boilerplates in crypto/ec/ 2018-12-06 14:51:47 +01:00
ecp_nistz256.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_oct.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecp_s390x_nistp.c Add pairwise consistency self tests to asym keygenerators 2020-03-03 14:02:36 +10:00
ecp_smpl.c Deprecate the ECDSA and EV_KEY_METHOD functions. 2020-02-04 20:02:55 +10:00
ecx_key.c Implement a stricter ECX_KEY type 2020-02-11 22:32:47 +00:00
ecx_meth.c Implement provider support for Ed25519 annd Ed448 2020-03-09 07:59:15 +00:00