]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add missing include guards in include
authorBob Beck <beck@openssl.org>
Mon, 27 Apr 2026 18:21:40 +0000 (12:21 -0600)
committerNorbert Pocs <norbertp@openssl.org>
Wed, 6 May 2026 11:35:24 +0000 (13:35 +0200)
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Wed May  6 11:35:47 2026
(Merged from https://github.com/openssl/openssl/pull/31001)

13 files changed:
include/crypto/bn_dh.h
include/crypto/context.h
include/crypto/lms_util.h
include/crypto/modes.h
include/crypto/objects.h
include/internal/bio_tfo.h
include/internal/namemap.h
include/internal/params.h
include/internal/ssl3_cbc.h
include/openssl/ecdh.h
include/openssl/ecdsa.h
include/openssl/ossl_typ.h
include/openssl/types.h

index a634a6f8f88172da4465d4b20c0a742cd5bfe360..fdb170ab3ff648c9e87aae93043ccc847c18b187 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_CRYPTO_BN_DH_H)
+#define OSSL_CRYPTO_BN_DH_H
+
 #define declare_dh_bn(x)                       \
     extern const BIGNUM ossl_bignum_dh##x##_p; \
     extern const BIGNUM ossl_bignum_dh##x##_q; \
@@ -41,3 +44,5 @@ extern const BIGNUM ossl_bignum_modp_3072_q;
 extern const BIGNUM ossl_bignum_modp_4096_q;
 extern const BIGNUM ossl_bignum_modp_6144_q;
 extern const BIGNUM ossl_bignum_modp_8192_q;
+
+#endif /* !defined(OSSL_CRYPTO_BN_DH_H) */
index 199df30726de14fe517461f5b7c50ef2f34ce6e4..d84b4879a69c594631d266b78618aa942fb36eb3 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_CRYPTO_CONTEXT_H)
+#define OSSL_CRYPTO_CONTEXT_H
+
 #include <openssl/core.h>
 
 void *ossl_provider_store_new(OSSL_LIB_CTX *);
@@ -48,3 +51,5 @@ void ossl_release_default_drbg_ctx(void);
 #if defined(OPENSSL_THREADS)
 void ossl_threads_ctx_free(void *);
 #endif
+
+#endif /* !defined(OSSL_CRYPTO_CONTEXT_H) */
index 622f3d08df44059756d34b410e75fe00c849e2a6..0f4f4e614320c50cde9b43ceff30094ab7bbf3e8 100644 (file)
@@ -9,6 +9,9 @@
 
 /* @brief Internal LMS helper functions */
 
+#if !defined(OSSL_CRYPTO_LMS_UTIL_H)
+#define OSSL_CRYPTO_LMS_UTIL_H
+
 #include "internal/packet.h"
 #include <openssl/params.h>
 #include <openssl/core_names.h>
@@ -50,3 +53,5 @@ static ossl_unused ossl_inline int lms_evp_md_ctx_init(EVP_MD_CTX *ctx, const EV
     }
     return EVP_DigestInit_ex2(ctx, md, p);
 }
+
+#endif /* !defined(OSSL_CRYPTO_LMS_UTIL_H) */
index 918d4e04b5401454831714a399232aa861f5a79c..b0358da31eef79ad3feda33edd97ca30ff4ed327 100644 (file)
@@ -8,6 +8,9 @@
  */
 
 /* This header can move into provider when legacy support is removed */
+#if !defined(OSSL_CRYPTO_MODES_H)
+#define OSSL_CRYPTO_MODES_H
+
 #include <openssl/modes.h>
 
 #if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
@@ -229,3 +232,5 @@ struct siv128_context {
 };
 
 #endif /* OPENSSL_NO_SIV */
+
+#endif /* !defined(OSSL_CRYPTO_MODES_H) */
index f22e9287723afd9c4e7fd9f255be603cfe2b4cdb..499c769dd06a6a1f327f7c0fa8e70e72c1e944ad 100644 (file)
@@ -7,6 +7,11 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_CRYPTO_OBJECTS_H)
+#define OSSL_CRYPTO_OBJECTS_H
+
 #include <openssl/objects.h>
 
 void ossl_obj_cleanup_int(void);
+
+#endif /* !defined(OSSL_CRYPTO_OBJECTS_H) */
index bfce90afafef50f16e689005f00cd5ffd61a05c7..68b85b0ecc634438f93719e2d3b4bb38a10d9586 100644 (file)
@@ -13,6 +13,9 @@
  */
 
 /* If a supported OS is added here, update test/bio_tfo_test.c */
+#if !defined(OSSL_INTERNAL_BIO_TFO_H)
+#define OSSL_INTERNAL_BIO_TFO_H
+
 #if defined(TCP_FASTOPEN) && !defined(OPENSSL_NO_TFO)
 
 #if defined(OPENSSL_SYS_MACOSX) || defined(__FreeBSD__)
 #endif
 
 #endif
+
+#endif /* !defined(OSSL_INTERNAL_BIO_TFO_H) */
index 70c6930543c91907e93bb6e6ad0acdd81ff53555..bea96857dca587cc220b8389aea4baff5ac3f94e 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_INTERNAL_NAMEMAP_H)
+#define OSSL_INTERNAL_NAMEMAP_H
+
 #include "internal/cryptlib.h"
 
 typedef struct ossl_namemap_st OSSL_NAMEMAP;
@@ -39,3 +42,5 @@ int ossl_namemap_doall_names(const OSSL_NAMEMAP *namemap, int number,
  */
 int ossl_namemap_add_names(OSSL_NAMEMAP *namemap, int number,
     const char *names, const char separator);
+
+#endif /* !defined(OSSL_INTERNAL_NAMEMAP_H) */
index fa948eb69cb23a0c13ee87c251f082698539e582..b5b423351f5f359d30d75a3c37e10a57f58396c7 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_INTERNAL_PARAMS_H)
+#define OSSL_INTERNAL_PARAMS_H
+
 #include <stddef.h>
 #include <openssl/params.h>
 
@@ -39,3 +42,5 @@ int ossl_param_get1_octet_string(const OSSL_PARAM *params, const char *name,
  */
 int ossl_param_get1_concat_octet_string(size_t n, OSSL_PARAM *params[],
     unsigned char **out, size_t *out_len);
+
+#endif /* !defined(OSSL_INTERNAL_PARAMS_H) */
index 4c102693a0fbc1bf8d11cb43623438f4eb421b36..89a3efa25d36dec7396a6e4b9e28aae8370b6df5 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_INTERNAL_SSL3_CBC_H)
+#define OSSL_INTERNAL_SSL3_CBC_H
+
 #include <openssl/evp.h>
 
 /* tls_pad.c */
@@ -38,3 +41,5 @@ __owur int ssl3_cbc_digest_record(const EVP_MD *md,
     size_t data_plus_mac_plus_padding_size,
     const unsigned char *mac_secret,
     size_t mac_secret_length, char is_sslv3);
+
+#endif /* !defined(OSSL_INTERNAL_SSL3_CBC_H) */
index 56bd4cc2ce0de4c0f34180c7ef51201f061f0172..3781b82cfad973a488da91ee7409c2a193d33ad1 100644 (file)
@@ -7,4 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_OPENSSL_ECDH_H)
+#define OSSL_OPENSSL_ECDH_H
+
 #include <openssl/ec.h>
+
+#endif /* !defined(OSSL_OPENSSL_ECDH_H) */
index 56bd4cc2ce0de4c0f34180c7ef51201f061f0172..e84dc60ed74c28cdef0cbf1881af7b91d1ae1269 100644 (file)
@@ -7,4 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_OPENSSL_ECDSA_H)
+#define OSSL_OPENSSL_ECDSA_H
+
 #include <openssl/ec.h>
+
+#endif /* !defined(OSSL_OPENSSL_ECDSA_H) */
index a562299b9f9ad0b26ca9496d53008388508923a0..c3899c97dc6a9b5e6b949f23d297b35fa5f393f8 100644 (file)
@@ -13,4 +13,9 @@
  * This header file only exists for compatibility reasons with older
  * applications which #include <openssl/ossl_typ.h>.
  */
+#if !defined(OSSL_OPENSSL_OSSL_TYP_H)
+#define OSSL_OPENSSL_OSSL_TYP_H
+
 #include <openssl/types.h>
+
+#endif /* !defined(OSSL_OPENSSL_OSSL_TYP_H) */
index 1857f8334691c10dc39664f64bd5be6f6e381a5a..cdb21495240fb1f55efc203521590b2036cff382 100644 (file)
@@ -11,6 +11,9 @@
  * Unfortunate workaround to avoid symbol conflict with wincrypt.h
  * See https://github.com/openssl/openssl/issues/9981
  */
+#if !defined(OSSL_OPENSSL_TYPES_H)
+#define OSSL_OPENSSL_TYPES_H
+
 #ifdef _WIN32
 #define WINCRYPT_USE_SYMBOL_PREFIX
 #undef X509_NAME
@@ -247,3 +250,5 @@ typedef struct ossl_echstore_st OSSL_ECHSTORE;
 #endif
 
 #endif /* OPENSSL_TYPES_H */
+
+#endif /* !defined(OSSL_OPENSSL_TYPES_H) */