]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add missing header guards in local crypto includes.
authorBob Beck <beck@openssl.org>
Mon, 27 Apr 2026 18:39:18 +0000 (12:39 -0600)
committerNorbert Pocs <norbertp@openssl.org>
Wed, 6 May 2026 11:35:24 +0000 (13:35 +0200)
These are guarded with "OSSL_LIBCRYPTO" to ensure the namespace
is distinct from the "OSSL_CRYPTO" guards used in include/crypto

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:55 2026
(Merged from https://github.com/openssl/openssl/pull/31001)

54 files changed:
crypto/asn1/asn1_local.h
crypto/asn1/tbl_standard.h
crypto/async/async_local.h
crypto/bf/bf_pi.h
crypto/bio/bio_local.h
crypto/cast/cast_local.h
crypto/cast/cast_s.h
crypto/comp/comp_local.h
crypto/conf/conf_local.h
crypto/ct/ct_local.h
crypto/des/spr.h
crypto/dh/dh_local.h
crypto/dsa/dsa_local.h
crypto/dso/dso_local.h
crypto/ec/ec_local.h
crypto/ec/ecx_backend.h
crypto/encode_decode/encoder_local.h
crypto/err/err_local.h
crypto/evp/evp_local.h
crypto/idea/idea_local.h
crypto/lhash/lhash_local.h
crypto/md4/md4_local.h
crypto/md5/md5_local.h
crypto/ml_dsa/ml_dsa_hash.h
crypto/ml_dsa/ml_dsa_key.h
crypto/ml_dsa/ml_dsa_matrix.h
crypto/ml_dsa/ml_dsa_poly.h
crypto/ml_dsa/ml_dsa_sign.h
crypto/ml_dsa/ml_dsa_vector.h
crypto/objects/obj_local.h
crypto/ocsp/ocsp_local.h
crypto/pem/pem_local.h
crypto/pkcs12/p12_local.h
crypto/pkcs7/pk7_local.h
crypto/property/property_local.h
crypto/provider_local.h
crypto/rc2/rc2_local.h
crypto/rc5/rc5_local.h
crypto/ripemd/rmd_local.h
crypto/ripemd/rmdconst.h
crypto/sha/sha_local.h
crypto/slh_dsa/slh_adrs.h
crypto/slh_dsa/slh_dsa_key.h
crypto/slh_dsa/slh_dsa_local.h
crypto/slh_dsa/slh_params.h
crypto/sm3/sm3_local.h
crypto/store/store_local.h
crypto/ts/ts_local.h
crypto/vms_rms.h
crypto/whrlpool/wp_local.h
crypto/x509/ext_dat.h
crypto/x509/pcy_local.h
crypto/x509/standard_exts.h
crypto/x509/x509_local.h

index ae6288f446f54e74734f08d90b7a978fdf75872c..3f230683d72f20bf348633c328aa0228c78612d3 100644 (file)
@@ -9,6 +9,9 @@
 
 /* Internal ASN1 structures and functions: not for application use */
 
+#if !defined(OSSL_LIBCRYPTO_ASN1_ASN1_LOCAL_H)
+#define OSSL_LIBCRYPTO_ASN1_ASN1_LOCAL_H
+
 #include "crypto/asn1.h"
 
 typedef const ASN1_VALUE const_ASN1_VALUE;
@@ -96,3 +99,5 @@ int ossl_asn1_item_ex_new_intern(ASN1_VALUE **pval, const ASN1_ITEM *it,
     OSSL_LIB_CTX *libctx, const char *propq);
 int ossl_asn1_time_time_t_to_tm(const time_t *time, struct tm *out_tm);
 int ossl_asn1_time_tm_to_time_t(const struct tm *tm, time_t *out);
+
+#endif /* !defined(OSSL_LIBCRYPTO_ASN1_ASN1_LOCAL_H) */
index da9c299bed8b3818890c711d83c0dac2de0d1e95..79f2f06c75354e0db0551bfe1a3345f214d84a14 100644 (file)
@@ -9,6 +9,9 @@
 
 /* size limits: this stuff is taken straight from RFC3280 */
 
+#if !defined(OSSL_LIBCRYPTO_ASN1_TBL_STANDARD_H)
+#define OSSL_LIBCRYPTO_ASN1_TBL_STANDARD_H
+
 #define ub_name 32768
 #define ub_common_name 64
 #define ub_locality_name 128
@@ -59,3 +62,5 @@ static const ASN1_STRING_TABLE tbl_standard[] = {
     { NID_dnsName, 0, -1, B_ASN1_UTF8STRING, STABLE_NO_MASK },
     { NID_id_on_SmtpUTF8Mailbox, 1, ub_email_address, B_ASN1_UTF8STRING, STABLE_NO_MASK }
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_ASN1_TBL_STANDARD_H) */
index 7d3058e05ecb8fc8d7e0568ac9c9bab7018e1928..9db3103c37ef1e029a2ae474d281e4b334ca1972 100644 (file)
@@ -11,6 +11,9 @@
  * Must do this before including any header files, because on MacOS/X <stlib.h>
  * includes <signal.h> which includes <ucontext.h>
  */
+#if !defined(OSSL_LIBCRYPTO_ASYNC_ASYNC_LOCAL_H)
+#define OSSL_LIBCRYPTO_ASYNC_ASYNC_LOCAL_H
+
 #if defined(__APPLE__) && defined(__MACH__) && !defined(_XOPEN_SOURCE)
 #define _XOPEN_SOURCE /* Otherwise incomplete ucontext_t structure */
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -80,3 +83,5 @@ void async_start_func(void);
 async_ctx *async_get_ctx(void);
 
 void async_wait_ctx_reset_counts(ASYNC_WAIT_CTX *ctx);
+
+#endif /* !defined(OSSL_LIBCRYPTO_ASYNC_ASYNC_LOCAL_H) */
index ffb3b3e9b35fed14c396dcf90ab00ff83cb34598..6971865c1b2ebcf0cecf5e1df13038fd9bc72c30 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_BF_BF_PI_H)
+#define OSSL_LIBCRYPTO_BF_BF_PI_H
+
 static const BF_KEY bf_init = {
     { 0x243f6a88L, 0x85a308d3L, 0x13198a2eL, 0x03707344L,
         0xa4093822L, 0x299f31d0L, 0x082efa98L, 0xec4e6c89L,
@@ -1040,3 +1043,5 @@ static const BF_KEY bf_init = {
         0x3ac372e6L,
     }
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_BF_BF_PI_H) */
index 60fb944928c0030d0f1b50c2b98915a3afd864b5..36f72f5df1b6650ffdd1267468f407c4e4b38d88 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_BIO_BIO_LOCAL_H)
+#define OSSL_LIBCRYPTO_BIO_BIO_LOCAL_H
+
 #include "internal/e_os.h"
 #include "internal/sockets.h"
 #include "internal/bio_addr.h"
@@ -178,3 +181,5 @@ void bio_sock_cleanup_int(void);
 #endif
 
 #endif
+
+#endif /* !defined(OSSL_LIBCRYPTO_BIO_BIO_LOCAL_H) */
index f24b8bccdc0c992090fa626e0594d093c4a1ee60..a3ea4d14de2cdb2c2c300589cce021565b4f1382 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_CAST_CAST_LOCAL_H)
+#define OSSL_LIBCRYPTO_CAST_CAST_LOCAL_H
+
 #ifdef OPENSSL_SYS_WIN32
 #include <stdlib.h>
 #endif
@@ -166,3 +169,5 @@ extern const CAST_LONG CAST_S_table4[256];
 extern const CAST_LONG CAST_S_table5[256];
 extern const CAST_LONG CAST_S_table6[256];
 extern const CAST_LONG CAST_S_table7[256];
+
+#endif /* !defined(OSSL_LIBCRYPTO_CAST_CAST_LOCAL_H) */
index 345b4dd731763b8f788627c668aaee9246525625..c76770f3447535420bbc7439b0fe29866b5a768f 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_CAST_CAST_S_H)
+#define OSSL_LIBCRYPTO_CAST_CAST_S_H
+
 const CAST_LONG CAST_S_table0[256] = {
     0x30fb40d4,
     0x9fa0ff0b,
@@ -2078,3 +2081,5 @@ const CAST_LONG CAST_S_table7[256] = {
     0x8db2a283,
     0xea8bf59e,
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_CAST_CAST_S_H) */
index fbc5ab318c1fbcf82d7fd7bd3247489d478ee841..913eb09f70d26e55dd11779555a6bea4a9467722 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_COMP_COMP_LOCAL_H)
+#define OSSL_LIBCRYPTO_COMP_COMP_LOCAL_H
+
 struct comp_method_st {
     int type; /* NID for compression library */
     const char *name; /* A text string to identify the library */
@@ -28,3 +31,5 @@ struct comp_ctx_st {
     unsigned long expand_out;
     void *data;
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_COMP_COMP_LOCAL_H) */
index f3b16f1138525c4c0051d717bd3a956234534c8c..1ecef7549a358bde2292e9ba1c0bcc59e4de6958 100644 (file)
@@ -7,5 +7,10 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_CONF_CONF_LOCAL_H)
+#define OSSL_LIBCRYPTO_CONF_CONF_LOCAL_H
+
 #include <openssl/conftypes.h>
 void ossl_config_add_ssl_module(void);
+
+#endif /* !defined(OSSL_LIBCRYPTO_CONF_CONF_LOCAL_H) */
index a06e42bb5be1d0379ab4d43258a05eabbc2e79d4..2fffc1a841e6d9fa4f9a1ee6b9c56164c972a104 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_CT_CT_LOCAL_H)
+#define OSSL_LIBCRYPTO_CT_CT_LOCAL_H
+
 #include <stddef.h>
 #include <openssl/ct.h>
 #include <openssl/evp.h>
@@ -215,3 +218,5 @@ __owur int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len);
  * Handlers for Certificate Transparency X509v3/OCSP extensions
  */
 extern const X509V3_EXT_METHOD ossl_v3_ct_scts[3];
+
+#endif /* !defined(OSSL_LIBCRYPTO_CT_CT_LOCAL_H) */
index 955fbc2989d8d29215875c5214827d52dbc0eb9d..3687bb3720975a88cd500c4b073d46e55a3e2289 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_DES_SPR_H)
+#define OSSL_LIBCRYPTO_DES_SPR_H
+
 const DES_LONG DES_SPtrans[8][64] = {
     {
         /* nibble 0 */
@@ -545,3 +548,5 @@ const DES_LONG DES_SPtrans[8][64] = {
         0x00820080L,
     }
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_DES_SPR_H) */
index 177f055a679507a05efe383c5a6bda080ae1add4..ea6c378a9d95e5a928e42746fe167fd7fa7a0549 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_DH_DH_LOCAL_H)
+#define OSSL_LIBCRYPTO_DH_DH_LOCAL_H
+
 #include <openssl/dh.h>
 #include "internal/refcount.h"
 #include "internal/ffc.h"
@@ -57,3 +60,5 @@ struct dh_method {
     int (*generate_params)(DH *dh, int prime_len, int generator,
         BN_GENCB *cb);
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_DH_DH_LOCAL_H) */
index a744463c87636ff1e2c8ae3fe78abf5c11033c02..566bcb0def09a2b8b188001ffc80c6ec8defb25a 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_DSA_DSA_LOCAL_H)
+#define OSSL_LIBCRYPTO_DSA_DSA_LOCAL_H
+
 #include <openssl/dsa.h>
 #include "internal/refcount.h"
 #include "internal/ffc.h"
@@ -70,3 +73,5 @@ struct dsa_method {
 DSA_SIG *ossl_dsa_do_sign_int(const unsigned char *dgst, int dlen, DSA *dsa,
     unsigned int nonce_type, const char *digestname,
     OSSL_LIB_CTX *libctx, const char *propq);
+
+#endif /* !defined(OSSL_LIBCRYPTO_DSA_DSA_LOCAL_H) */
index f3ec80210118ca1ec437fbbe3896192c330364bd..8318e3ab0c242128d42103f69b670fb2b7b9fc64 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_DSO_DSO_LOCAL_H)
+#define OSSL_LIBCRYPTO_DSO_DSO_LOCAL_H
+
 #include <stdio.h>
 #include "internal/cryptlib.h"
 #include "internal/dso.h"
@@ -104,3 +107,5 @@ struct dso_meth_st {
     /* Perform global symbol lookup, i.e. among *all* modules */
     void *(*globallookup)(const char *symname);
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_DSO_DSO_LOCAL_H) */
index c6a5753005604dc194db315393f7148c903690e9..16adfbb92ff28ce74114bcceeaefa5b89bcd25f9 100644 (file)
@@ -8,6 +8,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_EC_EC_LOCAL_H)
+#define OSSL_LIBCRYPTO_EC_EC_LOCAL_H
+
 #include <stdlib.h>
 
 #include <openssl/obj_mac.h>
@@ -794,3 +797,5 @@ static ossl_inline int ec_point_ladder_post(const EC_GROUP *group,
 
     return 1;
 }
+
+#endif /* !defined(OSSL_LIBCRYPTO_EC_EC_LOCAL_H) */
index d3d889c3a57629ab5c6e03f760419b262dedaa37..c549178d9c606af700fe1b1934e6728802552b7c 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_EC_ECX_BACKEND_H)
+#define OSSL_LIBCRYPTO_EC_ECX_BACKEND_H
+
 #define ISX448(id) ((id) == EVP_PKEY_X448)
 #define IS25519(id) ((id) == EVP_PKEY_X25519 || (id) == EVP_PKEY_ED25519)
 #define KEYLENID(id) (IS25519(id) ? X25519_KEYLEN                        \
@@ -18,3 +21,5 @@
                  : ((id) == EVP_PKEY_X448 ? ECX_KEY_TYPE_X448       \
                                           : ECX_KEY_TYPE_ED448))
 #define KEYLEN(p) KEYLENID((p)->ameth->pkey_id)
+
+#endif /* !defined(OSSL_LIBCRYPTO_EC_ECX_BACKEND_H) */
index a35c6174db39306ee5c585a60de3964138e4b850..789212746b84546ea5754acacf0b2c44e1b363fc 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_ENCODE_DECODE_ENCODER_LOCAL_H)
+#define OSSL_LIBCRYPTO_ENCODE_DECODE_ENCODER_LOCAL_H
+
 #include <openssl/core_dispatch.h>
 #include <openssl/types.h>
 #include <openssl/safestack.h>
@@ -177,3 +180,5 @@ ossl_encoder_parsed_properties(const OSSL_ENCODER *encoder);
 
 int ossl_decoder_fast_is_a(OSSL_DECODER *decoder,
     const char *name, int *id_cache);
+
+#endif /* !defined(OSSL_LIBCRYPTO_ENCODE_DECODE_ENCODER_LOCAL_H) */
index 4ddf7f7664c644a5c1b73430dcf6bcd2cfbca1d6..99aa5c76328a17ad5e5705b30605715faca7fba9 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_ERR_ERR_LOCAL_H)
+#define OSSL_LIBCRYPTO_ERR_ERR_LOCAL_H
+
 #include <string.h>
 #include <openssl/err.h>
 #include <openssl/e_os2.h>
@@ -115,3 +118,5 @@ static ossl_inline void err_clear(ERR_STATE *es, size_t i, int deall)
 ERR_STATE *ossl_err_get_state_int(int save_sys_error);
 void ossl_err_string_int(unsigned long e, const char *func,
     char *buf, size_t len);
+
+#endif /* !defined(OSSL_LIBCRYPTO_ERR_ERR_LOCAL_H) */
index edc3f9bb1cd5ea8d28773e2888322d056a82d625..fc00d2484053a78b70c80c52465f0930b63baa60 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_EVP_EVP_LOCAL_H)
+#define OSSL_LIBCRYPTO_EVP_EVP_LOCAL_H
+
 #include <openssl/core_dispatch.h>
 #include "internal/refcount.h"
 
@@ -390,3 +393,5 @@ int evp_names_do_all(OSSL_PROVIDER *prov, int number,
     void (*fn)(const char *name, void *data),
     void *data);
 int evp_cipher_cache_constants(EVP_CIPHER *cipher);
+
+#endif /* !defined(OSSL_LIBCRYPTO_EVP_EVP_LOCAL_H) */
index 73dcd3adbd8ed63ea3416a6bed203af26616de29..d90d4293e057c24504fb471095cbcb3dc0fcaeaf 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_IDEA_IDEA_LOCAL_H)
+#define OSSL_LIBCRYPTO_IDEA_IDEA_LOCAL_H
+
 #define idea_mul(r, a, b, ul)                                          \
     ul = (unsigned long)a * b;                                         \
     if (ul != 0) {                                                     \
     ul = x2 ^ t0; /* do the swap to x3 */ \
     x2 = x3 ^ t1;                         \
     x3 = ul;
+
+#endif /* !defined(OSSL_LIBCRYPTO_IDEA_IDEA_LOCAL_H) */
index 4a7cdfb9f6620e184f0041884ea6fcd7fae1bfc3..c35b3987461576a9a8066e28bcea482d2754908e 100644 (file)
@@ -6,6 +6,9 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+#if !defined(OSSL_LIBCRYPTO_LHASH_LHASH_LOCAL_H)
+#define OSSL_LIBCRYPTO_LHASH_LHASH_LOCAL_H
+
 #include <openssl/crypto.h>
 
 #include "internal/tsan_assist.h"
@@ -33,3 +36,5 @@ struct lhash_st {
     unsigned long num_items;
     int error;
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_LHASH_LHASH_LOCAL_H) */
index d52914d0c8c778b62db9b417fadd56250ca89ed7..c6ccfb1c789d3346a40f9f71edbe5fd88934ee69 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_MD4_MD4_LOCAL_H)
+#define OSSL_LIBCRYPTO_MD4_MD4_LOCAL_H
+
 #include <stdlib.h>
 #include <string.h>
 #include <openssl/opensslconf.h>
@@ -71,3 +74,5 @@ void md4_block_data_order(MD4_CTX *c, const void *p, size_t num);
         a += ((k) + (t) + H((b), (c), (d))); \
         a = ROTATE(a, s);                    \
     };
+
+#endif /* !defined(OSSL_LIBCRYPTO_MD4_MD4_LOCAL_H) */
index 090651616eca18f0489fd1baae975a741db1763d..581222a7912f3edf2be269aa0ab915f8f79eda69 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_MD5_MD5_LOCAL_H)
+#define OSSL_LIBCRYPTO_MD5_MD5_LOCAL_H
+
 #include <stdlib.h>
 #include <string.h>
 #include <openssl/e_os2.h>
@@ -92,3 +95,5 @@ void md5_block_data_order(MD5_CTX *c, const void *p, size_t num);
         a = ROTATE(a, s);                    \
         a += b;                              \
     };
+
+#endif /* !defined(OSSL_LIBCRYPTO_MD5_MD5_LOCAL_H) */
index 7625d3367d9c3e57d48e3abf7a3c0178bfd82b5e..1b7ce6351607023de52230f8500c380318a32766 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_HASH_H)
+#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_HASH_H
+
 #include <openssl/evp.h>
 
 static ossl_inline ossl_unused int
@@ -39,3 +42,5 @@ shake_xof_3(EVP_MD_CTX *ctx, const EVP_MD *md, const uint8_t *in1, size_t in1_le
         && EVP_DigestUpdate(ctx, in3, in3_len)
         && EVP_DigestSqueeze(ctx, out, out_len);
 }
+
+#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_HASH_H) */
index e89bb01ca444e9fff03075c8e85382f820574c55..6defd090feded1acdd834e5fcdc49f82f51a6ed9 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_KEY_H)
+#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_KEY_H
+
 #include <openssl/e_os2.h>
 #include "ml_dsa_local.h"
 #include "ml_dsa_vector.h"
@@ -54,3 +57,5 @@ struct ml_dsa_key_st {
     VECTOR s1; /* private secret of size L with short coefficients (-4..4) or (-2..2) */
     /* The s1->poly block is allocated and has space for s2 and t0 also */
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_KEY_H) */
index 0352ecac7afc02ed3b00ea4e6267f38c20040ed6..2610e17dfe8f2b89f0eb71bd12e3443bcd307205 100644 (file)
@@ -8,6 +8,9 @@
  */
 
 /* A 'k' by 'l' Matrix object ('k' rows and 'l' columns) containing polynomial scalars */
+#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_MATRIX_H)
+#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_MATRIX_H
+
 struct matrix_st {
     POLY *m_poly;
     size_t k, l;
@@ -42,3 +45,5 @@ matrix_expand_A(EVP_MD_CTX *g_ctx, const EVP_MD *md, const uint8_t *rho,
 {
     return ossl_ml_dsa_matrix_expand_A(g_ctx, md, rho, out);
 }
+
+#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_MATRIX_H) */
index 5edc11be806490d160f60044f1b788f73d8c22aa..3cdb38ea16ff84ba5170035f69a62e7cf47e341a 100644 (file)
@@ -6,6 +6,9 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_POLY_H)
+#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_POLY_H
+
 #include <openssl/crypto.h>
 
 #define ML_DSA_NUM_POLY_COEFFICIENTS 256
@@ -182,3 +185,5 @@ poly_max_signed(const POLY *p, uint32_t *mx)
         *mx = maximum(*mx, abs);
     }
 }
+
+#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_POLY_H) */
index 23f44e1702b9a95e8d540bb572d268fb4ffed8f7..be4b2920e01c20d7213697c78e1e33a2b1448289 100644 (file)
@@ -7,9 +7,14 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_SIGN_H)
+#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_SIGN_H
+
 struct ml_dsa_sig_st {
     VECTOR z;
     VECTOR hint;
     uint8_t *c_tilde;
     size_t c_tilde_len;
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_SIGN_H) */
index 0693eb6e3c30cefd7f70bfcbb998693b30322b5e..6b408acdc20ef80c5a3b763f47ff40bfa6c1d28f 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_VECTOR_H)
+#define OSSL_LIBCRYPTO_ML_DSA_ML_DSA_VECTOR_H
+
 #include <assert.h>
 #include "ml_dsa_poly.h"
 
@@ -272,3 +275,5 @@ vector_use_hint(const VECTOR *h, const VECTOR *r, uint32_t gamma2, VECTOR *out)
     for (i = 0; i < out->num_poly; i++)
         poly_use_hint(h->poly + i, r->poly + i, gamma2, out->poly + i);
 }
+
+#endif /* !defined(OSSL_LIBCRYPTO_ML_DSA_ML_DSA_VECTOR_H) */
index 73848a6fbfe193b4577582f02787edbf758d05d4..b17ef9ae09008c4133ac5968b29f68db21a367cd 100644 (file)
@@ -7,8 +7,13 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_OBJECTS_OBJ_LOCAL_H)
+#define OSSL_LIBCRYPTO_OBJECTS_OBJ_LOCAL_H
+
 typedef struct name_funcs_st NAME_FUNCS;
 DEFINE_STACK_OF(NAME_FUNCS)
 DEFINE_LHASH_OF_EX(OBJ_NAME);
 typedef struct added_obj_st ADDED_OBJ;
 DEFINE_LHASH_OF_EX(ADDED_OBJ);
+
+#endif /* !defined(OSSL_LIBCRYPTO_OBJECTS_OBJ_LOCAL_H) */
index 03c5aaef8666aaddd3c9f7cc63d563fb35d65af5..2a9e95852a40988c6c76eb2cf235528949ee50a3 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_OCSP_OCSP_LOCAL_H)
+#define OSSL_LIBCRYPTO_OCSP_OCSP_LOCAL_H
+
 #include "crypto/x509.h" /* for ossl_x509_add_cert_new() */
 
 /*-  CertID ::= SEQUENCE {
@@ -244,3 +247,5 @@ struct ocsp_service_locator_st {
     ASN1_item_verify_ex(ASN1_ITEM_rptr(OCSP_RESPDATA), \
         &(a)->signatureAlgorithm, (a)->signature,      \
         &(a)->tbsResponseData, NULL, r, libctx, propq)
+
+#endif /* !defined(OSSL_LIBCRYPTO_OCSP_OCSP_LOCAL_H) */
index ef2874db4ab87cf0c683a1f3701fb54808013b1b..840b6acb7f94cfd3b351a14371f6a11af009d3a0 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_PEM_PEM_LOCAL_H)
+#define OSSL_LIBCRYPTO_PEM_PEM_LOCAL_H
+
 #include <openssl/core_dispatch.h>
 #include <openssl/pem.h>
 #include <openssl/encoder.h>
 #define IMPLEMENT_PEM_provided_rw_cb(name, TYPE, type, str, asn1) \
     IMPLEMENT_PEM_read(name, TYPE, str, asn1)                     \
     IMPLEMENT_PEM_provided_write_cb(name, TYPE, type, str, asn1)
+
+#endif /* !defined(OSSL_LIBCRYPTO_PEM_PEM_LOCAL_H) */
index 34ffffb69242433c25350d5f739639796b590025..9dce1e14f9251e8c6d254f9dd624d3a20b0f3b8a 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_PKCS12_P12_LOCAL_H)
+#define OSSL_LIBCRYPTO_PKCS12_P12_LOCAL_H
+
 struct PKCS12_MAC_DATA_st {
     X509_SIG *dinfo;
     ASN1_OCTET_STRING *salt;
@@ -43,3 +46,5 @@ struct pkcs12_bag_st {
 };
 
 const PKCS7_CTX *ossl_pkcs12_get0_pkcs7ctx(const PKCS12 *p12);
+
+#endif /* !defined(OSSL_LIBCRYPTO_PKCS12_P12_LOCAL_H) */
index 79f909f3dd867001090cff9a07a6d7db7e70ef1e..2155b7b56f2baae65d0bb2e0d4c6b511fb07da9a 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_PKCS7_PK7_LOCAL_H)
+#define OSSL_LIBCRYPTO_PKCS7_PK7_LOCAL_H
+
 #include "crypto/pkcs7.h"
 
 STACK_OF(X509) *pkcs7_get0_certificates(const PKCS7 *p7);
@@ -15,3 +18,5 @@ OSSL_LIB_CTX *ossl_pkcs7_ctx_get0_libctx(const PKCS7_CTX *ctx);
 const char *ossl_pkcs7_ctx_get0_propq(const PKCS7_CTX *ctx);
 
 int ossl_pkcs7_ctx_propagate(const PKCS7 *from, PKCS7 *to);
+
+#endif /* !defined(OSSL_LIBCRYPTO_PKCS7_PK7_LOCAL_H) */
index 98484240bb554d9ea07ab60919ef1d03c0a10a47..0e63b2b67f4cc57a1bd1d6bdedca99332e8a44d1 100644 (file)
@@ -8,6 +8,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_PROPERTY_PROPERTY_LOCAL_H)
+#define OSSL_LIBCRYPTO_PROPERTY_PROPERTY_LOCAL_H
+
 #include <openssl/crypto.h>
 #include "internal/property.h"
 
@@ -55,3 +58,5 @@ int ossl_property_has_optional(const OSSL_PROPERTY_LIST *query);
 OSSL_PROPERTY_LIST *ossl_prop_defn_get(OSSL_LIB_CTX *ctx, const char *prop);
 int ossl_prop_defn_set(OSSL_LIB_CTX *ctx, const char *prop,
     OSSL_PROPERTY_LIST **pl);
+
+#endif /* !defined(OSSL_LIBCRYPTO_PROPERTY_PROPERTY_LOCAL_H) */
index 7799980808fdd5982c771aba292c96479bfedd13..a7c830ab511e7c2b3a56ecfcdf186a5d57bef310 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_PROVIDER_LOCAL_H)
+#define OSSL_LIBCRYPTO_PROVIDER_LOCAL_H
+
 #include <openssl/core.h>
 
 typedef struct {
@@ -31,3 +34,5 @@ int ossl_provider_info_add_to_store(OSSL_LIB_CTX *libctx,
 int ossl_provider_info_add_parameter(OSSL_PROVIDER_INFO *provinfo,
     const char *name,
     const char *value);
+
+#endif /* !defined(OSSL_LIBCRYPTO_PROVIDER_LOCAL_H) */
index f4bd06aaa669da8043ef1bc7adc6316e9bd1b3fe..c4b856951401c92d2b36e2e0be4d1fdbf234a545 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_RC2_RC2_LOCAL_H)
+#define OSSL_LIBCRYPTO_RC2_RC2_LOCAL_H
+
 #undef c2l
 #define c2l(c, l) (l = ((unsigned long)(*((c)++))), \
     l |= ((unsigned long)(*((c)++))) << 8L,         \
@@ -83,3 +86,5 @@
             *(--(c)) = (unsigned char)(((l1)) & 0xff);        \
         }                                                     \
     }
+
+#endif /* !defined(OSSL_LIBCRYPTO_RC2_RC2_LOCAL_H) */
index 57a1642c97e68b25972cc0939e27d3b61b5ba75b..7b29c9b853bb829c7229a03869ed9bfd4a6811ea 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_RC5_RC5_LOCAL_H)
+#define OSSL_LIBCRYPTO_RC5_RC5_LOCAL_H
+
 #include <stdlib.h>
 
 #undef c2l
     a &= RC5_32_MASK;        \
     a = ROTATE_r32(a, b);    \
     a ^= b;
+
+#endif /* !defined(OSSL_LIBCRYPTO_RC5_RC5_LOCAL_H) */
index 2e47ede12a38ec9a355c8bbdaada60e8f0a27c20..a1dd4802826e2cefa4fa5cdf0a8320a89b0a622b 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_RIPEMD_RMD_LOCAL_H)
+#define OSSL_LIBCRYPTO_RIPEMD_RMD_LOCAL_H
+
 #include <stdlib.h>
 #include <string.h>
 #include <openssl/opensslconf.h>
@@ -103,3 +106,5 @@ void ripemd160_block_data_order(RIPEMD160_CTX *c, const void *p, size_t num);
         a = ROTATE(a, s) + e;        \
         c = ROTATE(c, 10);           \
     }
+
+#endif /* !defined(OSSL_LIBCRYPTO_RIPEMD_RMD_LOCAL_H) */
index f9daf1b09f2615644de3370eea54cbba0eed1446..bb48abe49ad2dcace6e8e05049de8e08a76a0483 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_RIPEMD_RMDCONST_H)
+#define OSSL_LIBCRYPTO_RIPEMD_RMDCONST_H
+
 #define KL0 0x00000000L
 #define KL1 0x5A827999L
 #define KL2 0x6ED9EBA1L
 #define SR78 11
 #define WR79 11
 #define SR79 11
+
+#endif /* !defined(OSSL_LIBCRYPTO_RIPEMD_RMDCONST_H) */
index 61693e943449710c9ca4437cfdd8e1795c8a7738..afe6df66d4607129cae4985ab4920282cab092b7 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_SHA_SHA_LOCAL_H)
+#define OSSL_LIBCRYPTO_SHA_SHA_LOCAL_H
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -440,3 +443,5 @@ static void HASH_BLOCK_DATA_ORDER(SHA_CTX *c, const void *p, size_t num)
 #endif
 
 #endif
+
+#endif /* !defined(OSSL_LIBCRYPTO_SHA_SHA_LOCAL_H) */
index 556d0ad28635e40269b67d9bc1cd507926c46267..f07d7e8b559e5aeae24fad949c8690fc82fbc963 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_ADRS_H)
+#define OSSL_LIBCRYPTO_SLH_DSA_SLH_ADRS_H
+
 #include <openssl/e_os2.h>
 
 /*
@@ -69,3 +72,5 @@ typedef struct slh_adrs_func_st {
 } SLH_ADRS_FUNC;
 
 const SLH_ADRS_FUNC *ossl_slh_get_adrs_fn(int is_compressed);
+
+#endif /* !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_ADRS_H) */
index eb6d32327e9c085490ff445187149e0b3f39bb50..412bffdeea1bcd32fb535c067efec4ba0e02c572 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_DSA_KEY_H)
+#define OSSL_LIBCRYPTO_SLH_DSA_SLH_DSA_KEY_H
+
 #include <openssl/e_os2.h>
 
 #define SLH_DSA_MAX_N 32
@@ -48,3 +51,5 @@ struct slh_dsa_key_st {
     EVP_MD *md_sha512; /* Used for SHA-512 hashes */
     EVP_MAC *hmac;
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_DSA_KEY_H) */
index e5b48167b81cb5db4f16fc3fa8164f4e8ec09351..f11bf097cdbc6ee8da10da84ec72754cedf8f9b6 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_DSA_LOCAL_H)
+#define OSSL_LIBCRYPTO_SLH_DSA_SLH_DSA_LOCAL_H
+
 #include "crypto/slh_dsa.h"
 #include "slh_hash.h"
 #include "slh_params.h"
@@ -93,3 +96,5 @@ __owur int ossl_slh_fors_pk_from_sig(SLH_DSA_HASH_CTX *ctx, PACKET *sig_rpkt,
     const uint8_t *md, const uint8_t *pk_seed,
     uint8_t *adrs,
     uint8_t *pk_out, size_t pk_out_len);
+
+#endif /* !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_DSA_LOCAL_H) */
index fea14d5d6a8cc3a155aeead8412e62e3dae517f9..edc3644b61f2501389b8bac3e5aea1dea17bbab7 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_PARAMS_H)
+#define OSSL_LIBCRYPTO_SLH_DSA_SLH_PARAMS_H
+
 #include <openssl/e_os2.h>
 
 /*
@@ -37,3 +40,5 @@ typedef struct slh_dsa_params_st {
 } SLH_DSA_PARAMS;
 
 const SLH_DSA_PARAMS *ossl_slh_dsa_params_get(const char *alg);
+
+#endif /* !defined(OSSL_LIBCRYPTO_SLH_DSA_SLH_PARAMS_H) */
index 722dc9acecd534205ff518bd3226f912a044ab00..a8f92be87e571a1eda938a66a43624da47048421 100644 (file)
@@ -9,6 +9,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_SM3_SM3_LOCAL_H)
+#define OSSL_LIBCRYPTO_SM3_SM3_LOCAL_H
+
 #include <string.h>
 #include "internal/cryptlib.h"
 #include "internal/sm3.h"
@@ -131,3 +134,5 @@ void ossl_sm3_transform(SM3_CTX *c, const unsigned char *data);
 #define SM3_F 0x163138aaUL
 #define SM3_G 0xe38dee4dUL
 #define SM3_H 0xb0fb0e4eUL
+
+#endif /* !defined(OSSL_LIBCRYPTO_SM3_SM3_LOCAL_H) */
index d5020e01a4b3dcacf383de29a6798f5b298252c2..f668d4bbbc3f2161024ce860584c0a8de4c2b728 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_STORE_STORE_LOCAL_H)
+#define OSSL_LIBCRYPTO_STORE_STORE_LOCAL_H
+
 #include <openssl/core_dispatch.h>
 #include "internal/thread_once.h"
 #include "internal/refcount.h"
@@ -175,3 +178,5 @@ struct ossl_load_result_data_st {
     OSSL_STORE_CTX *ctx;
 };
 OSSL_CALLBACK ossl_store_handle_load_result;
+
+#endif /* !defined(OSSL_LIBCRYPTO_STORE_STORE_LOCAL_H) */
index 7aebad0948eecd3ec6cb1ae64bf7debdf00c2025..d86b395472b9b09950343544cf46a67ee32230f2 100644 (file)
@@ -12,6 +12,9 @@
  *      hashAlgorithm                AlgorithmIdentifier,
  *      hashedMessage                OCTET STRING  }
  */
+#if !defined(OSSL_LIBCRYPTO_TS_TS_LOCAL_H)
+#define OSSL_LIBCRYPTO_TS_TS_LOCAL_H
+
 struct TS_msg_imprint_st {
     X509_ALGOR *hash_algo;
     ASN1_OCTET_STRING *hashed_msg;
@@ -150,3 +153,5 @@ struct TS_verify_ctx {
     /* Must be set only with TS_VFY_TSA_NAME. */
     GENERAL_NAME *tsa_name;
 };
+
+#endif /* !defined(OSSL_LIBCRYPTO_TS_TS_LOCAL_H) */
index fed6cd0fc33b287515e672d2284503cd572ca4f9..3c3c98ea13d654b74d98312dcf94b7539786cb61 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_VMS_RMS_H)
+#define OSSL_LIBCRYPTO_VMS_RMS_H
+
 #ifdef NAML$C_MAXRSS
 
 #define CC_RMS_NAMX cc$rms_naml
@@ -58,3 +61,5 @@
 #endif /* def NAM$M_NO_SHORT_UPCASE [else] */
 
 #endif /* def NAML$C_MAXRSS [else] */
+
+#endif /* !defined(OSSL_LIBCRYPTO_VMS_RMS_H) */
index 73dc2a003da32d468273966e3a157c57023779c8..8e7c8b52ec133e12c51d24c173641734a5942bd9 100644 (file)
@@ -7,6 +7,11 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_WHRLPOOL_WP_LOCAL_H)
+#define OSSL_LIBCRYPTO_WHRLPOOL_WP_LOCAL_H
+
 #include <openssl/whrlpool.h>
 
 void whirlpool_block(WHIRLPOOL_CTX *, const void *, size_t);
+
+#endif /* !defined(OSSL_LIBCRYPTO_WHRLPOOL_WP_LOCAL_H) */
index 5d4c2fdb86ce26b5b125c6b6e6ebe814fd25af54..bec7716135d3d9374f86e01235740c380603e2a4 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_X509_EXT_DAT_H)
+#define OSSL_LIBCRYPTO_X509_EXT_DAT_H
+
 int ossl_v3_name_cmp(const char *name, const char *cmp);
 
 extern const X509V3_EXT_METHOD ossl_v3_bcons, ossl_v3_nscert, ossl_v3_key_usage, ossl_v3_ext_ku;
@@ -49,3 +52,5 @@ extern const X509V3_EXT_METHOD ossl_v3_time_specification;
 extern const X509V3_EXT_METHOD ossl_v3_attribute_mappings;
 extern const X509V3_EXT_METHOD ossl_v3_allowed_attribute_assignments;
 extern const X509V3_EXT_METHOD ossl_v3_aa_issuing_dist_point;
+
+#endif /* !defined(OSSL_LIBCRYPTO_X509_EXT_DAT_H) */
index 957ea59723baba9ef5cc93c14d48935119be5652..56466ea07f56c73711944d809fb0b2864e48ba6d 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#if !defined(OSSL_LIBCRYPTO_X509_PCY_LOCAL_H)
+#define OSSL_LIBCRYPTO_X509_PCY_LOCAL_H
+
 typedef struct X509_POLICY_DATA_st X509_POLICY_DATA;
 
 DEFINE_STACK_OF(X509_POLICY_DATA)
@@ -169,3 +172,5 @@ int ossl_policy_node_match(const X509_POLICY_LEVEL *lvl,
     const X509_POLICY_NODE *node, const ASN1_OBJECT *oid);
 
 const X509_POLICY_CACHE *ossl_policy_cache_set(X509 *x);
+
+#endif /* !defined(OSSL_LIBCRYPTO_X509_PCY_LOCAL_H) */
index 46bda55558fd686f71358bab0f12697adfbb2b01..14e6455ae142dfe6c772e7bfd67930681998f774 100644 (file)
@@ -12,6 +12,9 @@
  * of the ext_nid values.
  */
 
+#if !defined(OSSL_LIBCRYPTO_X509_STANDARD_EXTS_H)
+#define OSSL_LIBCRYPTO_X509_STANDARD_EXTS_H
+
 static const X509V3_EXT_METHOD *const standard_exts[] = {
     &ossl_v3_nscert,
     &ossl_v3_ns_ia5_list[0],
@@ -97,3 +100,5 @@ static const X509V3_EXT_METHOD *const standard_exts[] = {
 /* Number of standard extensions */
 
 #define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
+
+#endif /* !defined(OSSL_LIBCRYPTO_X509_STANDARD_EXTS_H) */
index 76c3a897f95ae425d7039550c3dbfb3fbc458b3a..a3433336ca0881df8e43612d89acb936b6ee0879 100644 (file)
@@ -6,6 +6,9 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+#if !defined(OSSL_LIBCRYPTO_X509_X509_LOCAL_H)
+#define OSSL_LIBCRYPTO_X509_X509_LOCAL_H
+
 #include <openssl/safestack.h>
 #include <openssl/x509_vfy.h>
 
@@ -195,3 +198,5 @@ int ossl_x509_check_rfc822(X509 *x, const char *chk, size_t chklen,
     unsigned int flags);
 int ossl_x509_check_smtputf8(X509 *x, const char *chk, size_t chklen,
     unsigned int flags);
+
+#endif /* !defined(OSSL_LIBCRYPTO_X509_X509_LOCAL_H) */