diff options
author | Richard Levitte <levitte@openssl.org> | 2020-10-04 16:34:31 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-18 23:38:34 +0100 |
commit | d7e498ac55f12bc2f4e7f948cbb8de2e3eeafc74 (patch) | |
tree | 755ca6bcbcd3b85d0371713d754b26f4a9d70250 /crypto/asn1/i2d_evp.c | |
parent | b24d6c335d3beb431f8f9847623d4db39ae1f96b (diff) |
Deprecate RSA harder
This deprecates all functions that deal with the types RSA and RSA_METHOD
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13096)
Diffstat (limited to 'crypto/asn1/i2d_evp.c')
-rw-r--r-- | crypto/asn1/i2d_evp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/asn1/i2d_evp.c b/crypto/asn1/i2d_evp.c index a81ae415fa..d0468bf5c2 100644 --- a/crypto/asn1/i2d_evp.c +++ b/crypto/asn1/i2d_evp.c @@ -16,7 +16,9 @@ #include <openssl/encoder.h> #include <openssl/buffer.h> #include <openssl/x509.h> -#include <openssl/rsa.h> /* For i2d_RSAPublicKey */ +#ifndef OPENSSL_NO_DEPRECATED_3_0 +# include <openssl/rsa.h> /* For i2d_RSAPublicKey */ +#endif #include <openssl/dsa.h> /* For i2d_DSAPublicKey */ #include <openssl/ec.h> /* For i2o_ECPublicKey */ #include "crypto/asn1.h" @@ -105,9 +107,11 @@ int i2d_PublicKey(const EVP_PKEY *a, unsigned char **pp) return i2d_provided(a, EVP_PKEY_PUBLIC_KEY, output_structures, pp); } switch (EVP_PKEY_id(a)) { -#ifndef OPENSSL_NO_RSA +#ifndef OPENSSL_NO_DEPRECATED_3_0 +# ifndef OPENSSL_NO_RSA case EVP_PKEY_RSA: return i2d_RSAPublicKey(EVP_PKEY_get0_RSA(a), pp); +# endif #endif #ifndef OPENSSL_NO_DSA case EVP_PKEY_DSA: |