summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2021-02-20 23:39:30 +0100
committerTomas Mraz <tomas@openssl.org>2022-11-23 18:08:25 +0100
commitf2a6f83862be3e20260b708288a8f7d0928e9018 (patch)
tree1e819cdc004040e668646cb9274bdf64105685d2
parent2da163cb73eabac7af093747ecee26ed76aa364a (diff)
Cleanup : directly include of `internal/nelem.h` when required.
And so clean a few useless includes Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19721)
-rw-r--r--apps/s_client.c1
-rw-r--r--crypto/ec/ec_backend.c1
-rw-r--r--engines/e_devcrypto.c1
-rw-r--r--include/internal/e_os.h1
-rw-r--r--providers/baseprov.c1
-rw-r--r--providers/common/provider_util.c1
-rw-r--r--providers/fips/fipsprov.c1
-rw-r--r--providers/implementations/encode_decode/decode_der2key.c1
-rw-r--r--providers/implementations/kdfs/x942kdf.c1
-rw-r--r--providers/implementations/kem/rsa_kem.c1
-rw-r--r--providers/implementations/rands/seeding/rand_unix.c1
-rw-r--r--providers/implementations/rands/seeding/rand_vms.c1
-rw-r--r--ssl/ssl_lib.c1
-rw-r--r--ssl/t1_trce.c1
-rw-r--r--test/mdc2test.c1
-rw-r--r--test/pkcs12_format_test.c2
-rw-r--r--test/testutil/format_output.c1
-rw-r--r--test/testutil/tests.c1
-rw-r--r--test/x509aux.c1
19 files changed, 11 insertions, 9 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index 0b8805a652..5324f50fcc 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -15,6 +15,7 @@
#include <string.h>
#include <errno.h>
#include <openssl/e_os2.h>
+#include "internal/nelem.h"
#ifndef OPENSSL_NO_SOCK
diff --git a/crypto/ec/ec_backend.c b/crypto/ec/ec_backend.c
index 60e88de488..b9ebc96465 100644
--- a/crypto/ec/ec_backend.c
+++ b/crypto/ec/ec_backend.c
@@ -25,6 +25,7 @@
#include "crypto/ec.h"
#include "ec_local.h"
#include "internal/e_os.h"
+#include "internal/nelem.h"
#include "internal/param_build_set.h"
/* Mapping between a flag and a name */
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
index 53aceefdb7..49ebe00b63 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -25,6 +25,7 @@
#include <openssl/engine.h>
#include <openssl/objects.h>
#include "crypto/cryptodev.h"
+#include "internal/nelem.h"
/* #define ENGINE_DEVCRYPTO_DEBUG */
diff --git a/include/internal/e_os.h b/include/internal/e_os.h
index 042b45b3f1..0455849559 100644
--- a/include/internal/e_os.h
+++ b/include/internal/e_os.h
@@ -15,7 +15,6 @@
# include <openssl/e_os2.h>
# include <openssl/crypto.h>
-# include "internal/nelem.h"
# include "internal/numbers.h" /* Ensure the definition of SIZE_MAX */
/*
diff --git a/providers/baseprov.c b/providers/baseprov.c
index 44c6e8b7e7..f2729b3307 100644
--- a/providers/baseprov.c
+++ b/providers/baseprov.c
@@ -19,7 +19,6 @@
#include "prov/providercommon.h"
#include "prov/implementations.h"
#include "prov/provider_util.h"
-#include "internal/nelem.h"
/*
* Forward declarations to ensure that interface functions are correctly
diff --git a/providers/common/provider_util.c b/providers/common/provider_util.c
index 2d8cba2ac9..2473754d26 100644
--- a/providers/common/provider_util.c
+++ b/providers/common/provider_util.c
@@ -19,7 +19,6 @@
# include "crypto/evp.h"
#endif
#include "prov/provider_util.h"
-#include "internal/nelem.h"
void ossl_prov_cipher_reset(PROV_CIPHER *pc)
{
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 533d9d1598..767b079e22 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -21,6 +21,7 @@
#include "prov/providercommon.h"
#include "prov/provider_util.h"
#include "prov/seeding.h"
+#include "internal/nelem.h"
#include "self_test.h"
#include "crypto/context.h"
#include "internal/core.h"
diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c
index d4d3731460..6ea8cc0550 100644
--- a/providers/implementations/encode_decode/decode_der2key.c
+++ b/providers/implementations/encode_decode/decode_der2key.c
@@ -35,6 +35,7 @@
#include "prov/bio.h"
#include "prov/implementations.h"
#include "endecoder_local.h"
+#include "internal/nelem.h"
struct der2key_ctx_st; /* Forward declaration */
typedef int check_key_fn(void *, struct der2key_ctx_st *ctx);
diff --git a/providers/implementations/kdfs/x942kdf.c b/providers/implementations/kdfs/x942kdf.c
index 5e5bf68d60..78bd8d235e 100644
--- a/providers/implementations/kdfs/x942kdf.c
+++ b/providers/implementations/kdfs/x942kdf.c
@@ -17,6 +17,7 @@
#include <openssl/proverr.h>
#include "internal/packet.h"
#include "internal/der.h"
+#include "internal/nelem.h"
#include "prov/provider_ctx.h"
#include "prov/providercommon.h"
#include "prov/implementations.h"
diff --git a/providers/implementations/kem/rsa_kem.c b/providers/implementations/kem/rsa_kem.c
index 882cf16125..365ae3d7d6 100644
--- a/providers/implementations/kem/rsa_kem.c
+++ b/providers/implementations/kem/rsa_kem.c
@@ -23,6 +23,7 @@
#include <openssl/err.h>
#include "crypto/rsa.h"
#include <openssl/proverr.h>
+#include "internal/nelem.h"
#include "prov/provider_ctx.h"
#include "prov/implementations.h"
#include "prov/securitycheck.h"
diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c
index 363f3b814e..fa7ad6cfeb 100644
--- a/providers/implementations/rands/seeding/rand_unix.c
+++ b/providers/implementations/rands/seeding/rand_unix.c
@@ -18,6 +18,7 @@
#include "crypto/rand_pool.h"
#include "crypto/rand.h"
#include "internal/dso.h"
+#include "internal/nelem.h"
#include "prov/seeding.h"
#ifdef __linux
diff --git a/providers/implementations/rands/seeding/rand_vms.c b/providers/implementations/rands/seeding/rand_vms.c
index 07814a43dc..4ff879491a 100644
--- a/providers/implementations/rands/seeding/rand_vms.c
+++ b/providers/implementations/rands/seeding/rand_vms.c
@@ -12,6 +12,7 @@
#define __NEW_STARLET 1 /* New starlet definitions since VMS 7.0 */
#include <unistd.h>
#include "internal/cryptlib.h"
+#include "internal/nelem.h"
#include <openssl/rand.h>
#include "crypto/rand.h"
#include "crypto/rand_pool.h"
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index f8b8378ee9..118c4d95ba 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -23,6 +23,7 @@
#include <openssl/trace.h>
#include <openssl/core_names.h>
#include "internal/cryptlib.h"
+#include "internal/nelem.h"
#include "internal/refcount.h"
#include "internal/ktls.h"
diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c
index fbaa199fd5..a9b132d93b 100644
--- a/ssl/t1_trce.c
+++ b/ssl/t1_trce.c
@@ -12,6 +12,7 @@
#ifndef OPENSSL_NO_SSL_TRACE
/* Packet trace support for OpenSSL */
+#include "internal/nelem.h"
typedef struct {
int num;
diff --git a/test/mdc2test.c b/test/mdc2test.c
index 9149e3e8ff..a524ceca16 100644
--- a/test/mdc2test.c
+++ b/test/mdc2test.c
@@ -18,7 +18,6 @@
#include <openssl/params.h>
#include <openssl/types.h>
#include <openssl/core_names.h>
-#include "internal/nelem.h"
#include "testutil.h"
#if defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_MDC2)
diff --git a/test/pkcs12_format_test.c b/test/pkcs12_format_test.c
index 0750f57e2f..507a9baf07 100644
--- a/test/pkcs12_format_test.c
+++ b/test/pkcs12_format_test.c
@@ -11,8 +11,6 @@
#include <string.h>
#include <stdlib.h>
-#include "internal/nelem.h"
-
#include <openssl/pkcs12.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
diff --git a/test/testutil/format_output.c b/test/testutil/format_output.c
index e101a7ecef..8e84e1a6b6 100644
--- a/test/testutil/format_output.c
+++ b/test/testutil/format_output.c
@@ -13,7 +13,6 @@
#include <string.h>
#include <ctype.h>
-#include "internal/nelem.h"
/* The size of memory buffers to display on failure */
#define MEM_BUFFER_SIZE (2000)
diff --git a/test/testutil/tests.c b/test/testutil/tests.c
index fbc2a0958e..50d4e12e05 100644
--- a/test/testutil/tests.c
+++ b/test/testutil/tests.c
@@ -14,7 +14,6 @@
#include <errno.h>
#include <string.h>
#include <ctype.h>
-#include "internal/nelem.h"
#include <openssl/asn1.h>
/*
diff --git a/test/x509aux.c b/test/x509aux.c
index bb3523dde5..7335e04771 100644
--- a/test/x509aux.c
+++ b/test/x509aux.c
@@ -16,7 +16,6 @@
#include <openssl/pem.h>
#include <openssl/conf.h>
#include <openssl/err.h>
-#include "internal/nelem.h"
#include "testutil.h"
static int test_certs(int num)