From 4032cd9a1434610e4dc2bbde01f98d04faa615e5 Mon Sep 17 00:00:00 2001 From: Yi Li Date: Mon, 17 Apr 2023 16:20:31 +0800 Subject: configure: introduce no-ecx to remove ECX related feature This can effectively reduce the binary size for platforms that don't need ECX feature(~100KB). Signed-off-by: Yi Li Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/20781) --- crypto/evp/p_lib.c | 4 ++-- crypto/evp/pmeth_lib.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'crypto/evp') diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index d0a7fde1e6..b26b606505 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -872,7 +872,7 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) } # endif /* OPENSSL_NO_DSA */ -# ifndef OPENSSL_NO_EC +# ifndef OPENSSL_NO_ECX static const ECX_KEY *evp_pkey_get0_ECX_KEY(const EVP_PKEY *pkey, int type) { if (EVP_PKEY_get_base_id(pkey) != type) { @@ -901,7 +901,7 @@ IMPLEMENT_ECX_VARIANT(X448) IMPLEMENT_ECX_VARIANT(ED25519) IMPLEMENT_ECX_VARIANT(ED448) -# endif +# endif /* OPENSSL_NO_ECX */ # if !defined(OPENSSL_NO_DH) && !defined(OPENSSL_NO_DEPRECATED_3_0) diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index caf10b2d5c..4b5225e439 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -66,11 +66,9 @@ static pmeth_fn standard_methods[] = { # ifndef OPENSSL_NO_DH ossl_dhx_pkey_method, # endif -# ifndef OPENSSL_NO_EC +# ifndef OPENSSL_NO_ECX ossl_ecx25519_pkey_method, ossl_ecx448_pkey_method, -# endif -# ifndef OPENSSL_NO_EC ossl_ed25519_pkey_method, ossl_ed448_pkey_method, # endif -- cgit v1.2.3