openssl/crypto/rsa
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
..
build.info PROV: add RSA signature implementation 2020-02-22 01:07:15 +01:00
rsa_aid.c PROV: add RSA signature implementation 2020-02-22 01:07:15 +01:00
rsa_ameth.c EVP: Check that key methods aren't foreign when exporting 2020-03-09 10:54:01 +01:00
rsa_asn1.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_chk.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_crpt.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_depr.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_err.c
rsa_gen.c Add pairwise consistency self tests to asym keygenerators 2020-03-03 14:02:36 +10:00
rsa_lib.c Change DH_get_nid() to set the value of q if it is not already set 2020-03-07 07:47:58 +10:00
rsa_local.h Change DH_get_nid() to set the value of q if it is not already set 2020-03-07 07:47:58 +10:00
rsa_meth.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_mp.c
rsa_none.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_oaep.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_ossl.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_pk1.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_pmeth.c PROV: add RSA signature implementation 2020-02-22 01:07:15 +01:00
rsa_prn.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_pss.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_saos.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_sign.c PROV: add RSA signature implementation 2020-02-22 01:07:15 +01:00
rsa_sp800_56b_check.c
rsa_sp800_56b_gen.c Change DH_get_nid() to set the value of q if it is not already set 2020-03-07 07:47:58 +10:00
rsa_ssl.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_x931.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
rsa_x931g.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00