diff options
author | Richard Levitte <levitte@openssl.org> | 2020-12-17 21:37:15 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-20 12:19:42 +0100 |
commit | 3a1ee3c1993c588a22cb80f1d0eb6237f83a1560 (patch) | |
tree | 3e915497790f85855ef9730b2d36bc97a688a9f4 /crypto/pem | |
parent | e3577adddf6bc4f0d9d202621a2c576d982d6f0a (diff) |
Drop OPENSSL_NO_RSA everywhere
The configuration option 'no-rsa' was dropped with OpenSSL 1.1.0, so
this is simply a cleanup of the remains.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13700)
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_all.c | 8 | ||||
-rw-r--r-- | crypto/pem/pem_info.c | 7 |
2 files changed, 3 insertions, 12 deletions
diff --git a/crypto/pem/pem_all.c b/crypto/pem/pem_all.c index ea758f04be..5f73f93ce8 100644 --- a/crypto/pem/pem_all.c +++ b/crypto/pem/pem_all.c @@ -25,9 +25,7 @@ #include <openssl/dh.h> #include "pem_local.h" -#ifndef OPENSSL_NO_RSA static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); -#endif #ifndef OPENSSL_NO_DSA static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa); #endif @@ -46,7 +44,6 @@ 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_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 @@ -77,7 +74,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) { @@ -86,12 +83,11 @@ 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_info.c b/crypto/pem/pem_info.c index 7537e5a31f..3911fdc5ee 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -124,9 +124,7 @@ STACK_OF(X509_INFO) goto start; } pp = &(xi->crl); - } else -#ifndef OPENSSL_NO_RSA - if (strcmp(name, PEM_STRING_RSA) == 0) { + } else if (strcmp(name, PEM_STRING_RSA) == 0) { d2i = (D2I_OF(void)) d2i_RSAPrivateKey; if (xi->x_pkey != NULL) { if (!sk_X509_INFO_push(ret, xi)) @@ -147,7 +145,6 @@ STACK_OF(X509_INFO) if ((int)strlen(header) > 10) /* assume encrypted */ raw = 1; } else -#endif #ifndef OPENSSL_NO_DSA if (strcmp(name, PEM_STRING_DSA) == 0) { d2i = (D2I_OF(void)) d2i_DSAPrivateKey; @@ -335,13 +332,11 @@ int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc, goto err; } else { /* Add DSA/DH */ -#ifndef OPENSSL_NO_RSA /* normal optionally encrypted stuff */ if (PEM_write_bio_RSAPrivateKey(bp, EVP_PKEY_get0_RSA(xi->x_pkey->dec_pkey), enc, kstr, klen, cb, u) <= 0) goto err; -#endif } } |