summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-12-02 18:27:03 +0100
committerRichard Levitte <levitte@openssl.org>2020-12-16 11:56:38 +0100
commitc2403f362efc519e473269d183adc7cceddb8c54 (patch)
tree356a5fce1a987659345a60cf0abb30d8412b73e2 /crypto/x509
parentEVP_PKEY & EC_KEY: Make EC EVP_PKEY_CTX parameter ctrls / setters more available (diff)
downloadopenssl-c2403f362efc519e473269d183adc7cceddb8c54.tar.xz
openssl-c2403f362efc519e473269d183adc7cceddb8c54.zip
Drop unnecessary checks of OPENSSL_NO_DH, OPENSSL_NO_DSA and OPENSSL_NO_EC
The apps, the CMS library and the X.509 library are primarly affected. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13589)
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_req.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c
index 3d59026832..f3764e4179 100644
--- a/crypto/x509/x509_req.c
+++ b/crypto/x509/x509_req.c
@@ -96,19 +96,6 @@ int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
ERR_raise(ERR_LIB_X509, X509_R_KEY_TYPE_MISMATCH);
break;
case -2:
-#ifndef OPENSSL_NO_EC
- if (EVP_PKEY_id(k) == EVP_PKEY_EC) {
- ERR_raise(ERR_LIB_X509, ERR_R_EC_LIB);
- break;
- }
-#endif
-#ifndef OPENSSL_NO_DH
- if (EVP_PKEY_id(k) == EVP_PKEY_DH) {
- /* No idea */
- ERR_raise(ERR_LIB_X509, X509_R_CANT_CHECK_DH_KEY);
- break;
- }
-#endif
ERR_raise(ERR_LIB_X509, X509_R_UNKNOWN_KEY_TYPE);
}