diff options
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_all.c | 8 | ||||
-rw-r--r-- | crypto/pem/pem_local.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/crypto/pem/pem_all.c b/crypto/pem/pem_all.c index 8d5b25156c..ea758f04be 100644 --- a/crypto/pem/pem_all.c +++ b/crypto/pem/pem_all.c @@ -45,7 +45,8 @@ IMPLEMENT_PEM_rw(PKCS7, PKCS7, PEM_STRING_PKCS7, PKCS7) IMPLEMENT_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE, PEM_STRING_X509, NETSCAPE_CERT_SEQUENCE) -#ifndef OPENSSL_NO_RSA +#ifndef OPENSSL_NO_DEPRECATED_3_0 +# ifndef OPENSSL_NO_RSA /* * We treat RSA or DSA private keys as a special case. For private keys we * read in an EVP_PKEY structure with PEM_read_bio_PrivateKey() and extract @@ -76,7 +77,7 @@ RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb, return pkey_get_rsa(pktmp, rsa); } -# ifndef OPENSSL_NO_STDIO +# ifndef OPENSSL_NO_STDIO RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, void *u) { @@ -85,11 +86,12 @@ RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, void *u) return pkey_get_rsa(pktmp, rsa); } -# endif +# endif IMPLEMENT_PEM_write_cb(RSAPrivateKey, RSA, PEM_STRING_RSA, RSAPrivateKey) IMPLEMENT_PEM_rw(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC, RSAPublicKey) IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA, PEM_STRING_PUBLIC, RSA_PUBKEY) +# endif #endif #ifndef OPENSSL_NO_DSA static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa) diff --git a/crypto/pem/pem_local.h b/crypto/pem/pem_local.h index 10761b03d3..7de2a71045 100644 --- a/crypto/pem/pem_local.h +++ b/crypto/pem/pem_local.h @@ -39,6 +39,9 @@ # define PEM_STRUCTURE_PrivateKey "pkcs8" # define PEM_STRUCTURE_Parameters "type-specific" +# define PEM_STRUCTURE_RSAPrivateKey "type-specific" +# define PEM_STRUCTURE_RSAPublicKey "type-specific" + /* Alternative IMPLEMENT macros for provided encoders */ # define IMPLEMENT_PEM_provided_write_body_vars(type, asn1) \ |