From c2403f362efc519e473269d183adc7cceddb8c54 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 2 Dec 2020 18:27:03 +0100 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/13589) --- crypto/x509/x509_req.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'crypto/x509/x509_req.c') 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); } -- cgit v1.2.3