]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
make includes self-contained
authorBob Beck <beck@openssl.org>
Wed, 3 Sep 2025 00:54:49 +0000 (18:54 -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:48 2026
(Merged from https://github.com/openssl/openssl/pull/31001)

26 files changed:
include/crypto/bn_dh.h
include/crypto/bn_srp.h
include/crypto/ess.h
include/crypto/lms_util.h
include/crypto/pkcs7.h
include/crypto/security_bits.h
include/crypto/siphash.h
include/crypto/siv.h
include/internal/core.h
include/internal/dane.h
include/internal/ech_helpers.h
include/internal/hashtable.h
include/internal/hpke_util.h
include/internal/passphrase.h
include/internal/qlog.h
include/internal/quic_thread_assist.h
include/internal/quic_trace.h
include/internal/ring_buf.h
include/internal/skey.h
include/internal/sm3.h
include/internal/sslconf.h
include/internal/statem.h
include/internal/threads_common.h
include/internal/tlsgroups.h
include/internal/to_hex.h
include/internal/unicode.h

index fdb170ab3ff648c9e87aae93043ccc847c18b187..89175dfac297986e5ff38bc07b1c32a1796aae2f 100644 (file)
@@ -10,6 +10,8 @@
 #if !defined(OSSL_CRYPTO_BN_DH_H)
 #define OSSL_CRYPTO_BN_DH_H
 
+#include <openssl/bn.h>
+
 #define declare_dh_bn(x)                       \
     extern const BIGNUM ossl_bignum_dh##x##_p; \
     extern const BIGNUM ossl_bignum_dh##x##_q; \
index 00b160aad1203e5076578b6a2cead189d28cab27..7e3dade0bd710a663c424a9f44647b374cdc0dfd 100644 (file)
@@ -6,9 +6,13 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+#if !defined(OPENSSL_CRYPTO_BN_SRP_H)
+#define OPENSSL_CRYPTO_BN_SRP_H
 
 #ifndef OPENSSL_NO_SRP
 
+#include <openssl/bn.h>
+
 extern const BIGNUM ossl_bn_group_1024;
 
 extern const BIGNUM ossl_bn_group_1536;
@@ -30,3 +34,4 @@ extern const BIGNUM ossl_bn_generator_5;
 extern const BIGNUM ossl_bn_generator_2;
 
 #endif
+#endif /* !defined(OPENSSL_CRYPTO_BN_SRP_H) */
index c29752117e407d7240589730b4565b5d2cc128d6..cc5bb7febcc7b2ce891bae0586d4570b4bc031b8 100644 (file)
 #define OSSL_CRYPTO_ESS_H
 #pragma once
 
+#include <openssl/asn1.h>
+#include <openssl/ess.h>
+#include <openssl/safestack.h>
+
 /*-
  * IssuerSerial ::= SEQUENCE {
  *        issuer                  GeneralNames,
index 0f4f4e614320c50cde9b43ceff30094ab7bbf3e8..54aa51e17a7baf8dc67d6e17bee0acdb9dd9a155 100644 (file)
@@ -17,6 +17,8 @@
 #include <openssl/core_names.h>
 #include <openssl/evp.h>
 
+#include "crypto/lms.h"
+
 /*
  * This LMS implementation assumes that the hash algorithm must be the same for
  * LMS params and OTS params. Since OpenSSL does not have a "SHAKE256-192"
index bf0e6bf607492b2af867177c272298d1930413ad..8d999fd44f8b884851438fc857f154db485e0bd5 100644 (file)
@@ -11,6 +11,8 @@
 #define OSSL_CRYPTO_PKCS7_H
 #pragma once
 
+#include <openssl/pkcs7.h>
+
 void ossl_pkcs7_resolve_libctx(PKCS7 *p7);
 
 void ossl_pkcs7_set0_libctx(PKCS7 *p7, OSSL_LIB_CTX *ctx);
index 56fe8d2573d4d06491c0906fa9a1a6f509d48b5a..8b42338a4dceb731ef1c2befac32902c1b7d38b0 100644 (file)
@@ -11,6 +11,8 @@
 #define OSSL_SECURITY_BITS_H
 #pragma once
 
+#include <stdint.h>
+
 uint16_t ossl_ifc_ffc_compute_security_bits(int n);
 
 #endif
index 3ffdc055e695f050b9036ed3416709c450480f43..cb2f6de68faba56666f7ed7037a09a1df118adb2 100644 (file)
@@ -12,6 +12,7 @@
 #pragma once
 
 #include <stddef.h>
+#include <stdint.h>
 
 #define SIPHASH_BLOCK_SIZE 8
 #define SIPHASH_KEY_SIZE 16
index b4f04a80c8a550268cb636cceb57bba46d753896..d842baae49411aab964cecf6b58a8b1b01862866 100644 (file)
@@ -6,9 +6,15 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+#if !defined(OPENSSL_CRYPTO_SIV_H)
+#define OPENSSL_CRYPTO_SIV_H
 
 #ifndef OPENSSL_NO_SIV
 
+#include <stddef.h>
+
+#include <openssl/evp.h>
+
 typedef struct siv128_context SIV128_CONTEXT;
 
 SIV128_CONTEXT *ossl_siv128_new(const unsigned char *key, int klen,
@@ -31,3 +37,4 @@ int ossl_siv128_cleanup(SIV128_CONTEXT *ctx);
 int ossl_siv128_speed(SIV128_CONTEXT *ctx, int arg);
 
 #endif /* OPENSSL_NO_SIV */
+#endif /* !defined (OPENSSL_CRYPTO_SIV_H) */
index 98fc4681d848f0436c053b9515f05c59be5ef8c2..5c9ffc657bd5b681be300ffafc58f91fc049ae78 100644 (file)
@@ -12,6 +12,7 @@
 #pragma once
 
 #include <openssl/conf.h>
+#include <openssl/types.h>
 
 /*
  * namespaces:
index 9c040eedc68333e9f174310f6b32c16401c92520..8df761facfbce5af3cb3bb66d2bc121f1c1ffbba 100644 (file)
@@ -11,6 +11,7 @@
 #define OSSL_INTERNAL_DANE_H
 #pragma once
 
+#include <openssl/evp.h>
 #include <openssl/safestack.h>
 
 /*-
index 6e7a7e29ff867647111aa12d7878404b44c6d6e2..00053eed6a7747fae4aad9b8a0a1eb556fe4d219 100644 (file)
@@ -15,6 +15,9 @@
 #define OPENSSL_ECH_HELPERS_H
 #pragma once
 
+#include <stddef.h>
+#include <stdint.h>
+
 #ifndef OPENSSL_NO_ECH
 
 /*
index 56a8b8254cdf8f4c2d62e5b2f1c2645f0b22273a..7c4150ba28890bf6a2de905cbf1b3bdc30ead4a5 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <stddef.h>
 #include <stdint.h>
+#include <string.h>
 #include <openssl/e_os2.h>
 #include <internal/rcu.h>
 #include "crypto/context.h"
index 9c52ba469386edeae51654ab5538b3357b2f64fc..152c3213edf614fa7714d72e6cc574bcb5869c0d 100644 (file)
 #define OSSL_INTERNAL_HPKE_UTIL_H
 #pragma once
 
+#include <stdint.h>
+
+#include <openssl/hpke.h>
+#include <openssl/types.h>
+
 /* Constants from RFC 9180 Section 7.1 and 7.3 */
 #define OSSL_HPKE_MAX_SECRET 64
 #define OSSL_HPKE_MAX_PUBLIC 133
index 803622867b7325fec3d59d6db3538edc3eb2085c..b7cbaa1057ade3d665133d67a727c4d5be800afc 100644 (file)
@@ -11,6 +11,8 @@
 #define OSSL_INTERNAL_PASSPHRASE_H
 #pragma once
 
+#include <openssl/ui.h>
+
 /*
  * This is a passphrase reader bridge with bells and whistles.
  *
index eb68570e6087dc28f377a882dce79551e776eaa3..ecabe942f2ea3818338ee443ad6351cfcfc85d60 100644 (file)
@@ -21,10 +21,11 @@ typedef struct qlog_st QLOG;
 
 enum {
     QLOG_EVENT_TYPE_NONE,
-
+/* clang-format off */
 #define QLOG_EVENT(cat, name) QLOG_EVENT_TYPE_##cat##_##name,
-#include "internal/qlog_events.h"
+#include "internal/qlog_events.inc"
 #undef QLOG_EVENT
+    /* clang-format on */
 
     QLOG_EVENT_TYPE_NUM
 };
index fbfac146dab0abdf20ed705f87a3df2a6cdc67ca..152c84663da2d26d84e6b6d389a5eea365b24db6 100644 (file)
@@ -11,6 +11,8 @@
 #define OSSL_QUIC_THREAD_ASSIST_H
 
 #include <openssl/ssl.h>
+
+#include "internal/quic_channel.h"
 #include "internal/thread.h"
 #include "internal/time.h"
 
index f462ce0c00901d6866008152a9ff0f0559dd317b..bddb9823c23b5c3ef2fa5f117362d63ac003df76 100644 (file)
 
 #ifndef OPENSSL_NO_QUIC
 
+#include <stddef.h>
+
+#include <openssl/ssl.h>
+
 int ossl_quic_trace(int write_p, int version, int content_type,
     const void *buf, size_t msglen, SSL *ssl, void *arg);
 
index cc70bfaeac9ab3ce72018f1b131f72033aa15016..19c13817fd486fc6a099dae77b9d72350feca3c9 100644 (file)
 #define OSSL_INTERNAL_RING_BUF_H
 #pragma once
 
+#include <assert.h>
+#include <string.h>
+
 #include <openssl/e_os2.h> /* For 'ossl_inline' */
+#include <openssl/crypto.h>
+
 #include "internal/safe_math.h"
 
 /*
index a4b6c6e6a9e5cc7f0ae5bc238c217875dbfac66b..b511af8c32c295bd788ad9bd17f41b652b5cbf44 100644 (file)
 #ifndef OSSL_CRYPTO_SKEY_H
 #define OSSL_CRYPTO_SKEY_H
 
+#include <stddef.h>
+
+#include <openssl/types.h>
+
 /* Known symmetric key type definitions */
 #define SKEY_TYPE_GENERIC 1 /* generic bytes container unknown key types */
 #define SKEY_TYPE_AES 2 /* AES keys */
index ee097d85e6d53e29f55eda640563869eb890b70e..0faf5449426b5179b63edf739de3eb81c39c3a47 100644 (file)
@@ -13,6 +13,8 @@
 #define OSSL_INTERNAL_SM3_H
 #pragma once
 
+#include <stddef.h>
+
 #include <openssl/opensslconf.h>
 
 #ifdef OPENSSL_NO_SM3
index 49da9230592f2280b81bcd569014a8748a091d89..a016613a57b3a77451f3986285daa17f5540c58d 100644 (file)
 #define OSSL_INTERNAL_SSLCONF_H
 #pragma once
 
+#include <stddef.h>
+
+#include <openssl/conf.h>
+
 typedef struct ssl_conf_cmd_st SSL_CONF_CMD;
 
 /*
index 3a6a63238c9d80f7e0b279f028905af1671747da..990100c4dc0553649234efc2c3135c0d896a8380 100644 (file)
@@ -9,6 +9,11 @@
 #ifndef OSSL_INTERNAL_STATEM_H
 #define OSSL_INTERNAL_STATEM_H
 
+#include <stddef.h>
+
+#include <openssl/e_os2.h>
+#include <openssl/ssl.h>
+
 /*****************************************************************************
  *                                                                           *
  * These enums should be considered PRIVATE to the state machine. No         *
index cf549148663737b1f158567df53e0974aeb93320..1f54eadf82901f4463c28139db502e937293c91f 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _CRYPTO_THREADS_COMMON_H_
 #define _CRYPTO_THREADS_COMMON_H_
 
+#include <openssl/types.h>
+
 #if defined(__clang__) && defined(__has_feature)
 #if __has_feature(thread_sanitizer)
 #define __SANITIZE_THREAD__
index c702471f6cbc7ad1d1ca68ee0832fc718098c1d5..f12e142b9a4bf2c7bcb54dd7fc86966b3f3ecc28 100644 (file)
 #define OSSL_INTERNAL_TLSGROUPS_H
 #pragma once
 
+#include <stdint.h>
+
+#include <openssl/e_os2.h> /* For 'ossl_inline' */
+
 #define OSSL_TLS_GROUP_ID_sect163k1 0x0001
 #define OSSL_TLS_GROUP_ID_sect163r1 0x0002
 #define OSSL_TLS_GROUP_ID_sect163r2 0x0003
index 36f4671c66b926cd866216d54b1f95059b528630..4b3940800f82aac40cc8456ef0355020f46448af 100644 (file)
@@ -11,6 +11,8 @@
 #define OSSL_INTERNAL_TO_HEX_H
 #pragma once
 
+#include <openssl/e_os2.h>
+
 static ossl_inline size_t to_hex(char *buf, uint8_t n, const char hexdig[17])
 {
     *buf++ = hexdig[(n >> 4) & 0xf];
index 4ef53cd69c2f305995a7c03799fe6d3868469bae..d1dae6d2453959569168d140c415199f519c7d6b 100644 (file)
@@ -11,6 +11,8 @@
 #define OSSL_INTERNAL_UNICODE_H
 #pragma once
 
+#include <openssl/e_os2.h>
+
 typedef enum {
     SURROGATE_MIN = 0xd800UL,
     SURROGATE_MAX = 0xdfffUL,