Skip to content

Commit

Permalink
Cleanup : directly include of internal/nelem.h when required.
Browse files Browse the repository at this point in the history
And so clean a few useless includes

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #19721)

(cherry picked from commit f2a6f83)
  • Loading branch information
FdaSilvaYY authored and t8m committed Nov 23, 2022
1 parent 3431dd4 commit fe60601
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions apps/s_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <string.h>
#include <errno.h>
#include <openssl/e_os2.h>
#include "internal/nelem.h"

#ifndef OPENSSL_NO_SOCK

Expand Down
1 change: 1 addition & 0 deletions crypto/ec/ec_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions engines/e_devcrypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <openssl/engine.h>
#include <openssl/objects.h>
#include "crypto/cryptodev.h"
#include "internal/nelem.h"

/* #define ENGINE_DEVCRYPTO_DEBUG */

Expand Down
1 change: 0 additions & 1 deletion include/internal/e_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

/*
Expand Down
1 change: 0 additions & 1 deletion providers/baseprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion providers/common/provider_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions providers/fips/fipsprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/encode_decode/decode_der2key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/kdfs/x942kdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/kem/rsa_kem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/rands/seeding/rand_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/rands/seeding/rand_vms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions ssl/ssl_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <openssl/ct.h>
#include <openssl/trace.h>
#include "internal/cryptlib.h"
#include "internal/nelem.h"
#include "internal/refcount.h"
#include "internal/ktls.h"

Expand Down
1 change: 1 addition & 0 deletions ssl/t1_trce.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#ifndef OPENSSL_NO_SSL_TRACE

/* Packet trace support for OpenSSL */
#include "internal/nelem.h"

typedef struct {
int num;
Expand Down
1 change: 0 additions & 1 deletion test/mdc2test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions test/pkcs12_format_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion test/testutil/format_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion test/testutil/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <errno.h>
#include <string.h>
#include <ctype.h>
#include "internal/nelem.h"
#include <openssl/asn1.h>

/*
Expand Down
1 change: 0 additions & 1 deletion test/x509aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe60601

Please sign in to comment.