Commit 7029431ebe for openssl.org
commit 7029431ebe65e0dd33b6e272b7752fcf55d0beab
Author: Bob Beck <beck@openssl.org>
Date: Mon Apr 27 17:54:20 2026 -0600
make providers includes self contained
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:36:07 2026
(Merged from https://github.com/openssl/openssl/pull/31001)
diff --git a/providers/common/include/prov/der_pq_dsa.h b/providers/common/include/prov/der_pq_dsa.h
index a17bcc7987..1ac4d80bf5 100644
--- a/providers/common/include/prov/der_pq_dsa.h
+++ b/providers/common/include/prov/der_pq_dsa.h
@@ -10,6 +10,9 @@
#if !defined(OSSL_PROVIDERS_COMMON_INCLUDE_PROV_DER_PQ_DSA_H)
#define OSSL_PROVIDERS_COMMON_INCLUDE_PROV_DER_PQ_DSA_H
+#include <stddef.h>
+#include <stdint.h>
+
int ossl_der_oid_pq_dsa_prehash_digest(const char *oid_digest_name,
const uint8_t **oid, size_t *oidlen, size_t *sz);
diff --git a/providers/implementations/ciphers/cipher_des.h b/providers/implementations/ciphers/cipher_des.h
index 3a965159b7..afbb665662 100644
--- a/providers/implementations/ciphers/cipher_des.h
+++ b/providers/implementations/ciphers/cipher_des.h
@@ -12,6 +12,7 @@
#include <openssl/des.h>
#include "crypto/des_platform.h"
+#include "prov/ciphercommon.h"
#define TDES_FLAGS 0
diff --git a/providers/implementations/ciphers/cipher_rc5.h b/providers/implementations/ciphers/cipher_rc5.h
index b2a5ff91bc..131c34f520 100644
--- a/providers/implementations/ciphers/cipher_rc5.h
+++ b/providers/implementations/ciphers/cipher_rc5.h
@@ -10,6 +10,7 @@
#if !defined(OSSL_PROVIDERS_IMPLEMENTATIONS_CIPHERS_CIPHER_RC5_H)
#define OSSL_PROVIDERS_IMPLEMENTATIONS_CIPHERS_CIPHER_RC5_H
+#if !defined(OPENSSL_NO_RC5)
#include <openssl/rc5.h>
#include "prov/ciphercommon.h"
@@ -27,4 +28,5 @@ const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ecb(size_t keybits);
const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ofb64(size_t keybits);
const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cfb64(size_t keybits);
+#endif /* defined(OPENSSL_NO_RC5) */
#endif /* !defined(OSSL_PROVIDERS_IMPLEMENTATIONS_CIPHERS_CIPHER_RC5_H) */
diff --git a/providers/implementations/ciphers/cipher_tdes.h b/providers/implementations/ciphers/cipher_tdes.h
index 3ba509f321..d3c383506f 100644
--- a/providers/implementations/ciphers/cipher_tdes.h
+++ b/providers/implementations/ciphers/cipher_tdes.h
@@ -11,7 +11,9 @@
#define OSSL_PROVIDERS_IMPLEMENTATIONS_CIPHERS_CIPHER_TDES_H
#include <openssl/des.h>
+#include <openssl/evp.h>
#include <openssl/core_dispatch.h>
+#include "prov/ciphercommon.h"
#include "prov/securitycheck.h"
#include "crypto/des_platform.h"
diff --git a/providers/implementations/digests/blake2_impl.h b/providers/implementations/digests/blake2_impl.h
index a4322b5762..389f2473a6 100644
--- a/providers/implementations/digests/blake2_impl.h
+++ b/providers/implementations/digests/blake2_impl.h
@@ -18,6 +18,9 @@
#define OSSL_PROVIDERS_IMPLEMENTATIONS_DIGESTS_BLAKE2_IMPL_H
#include <string.h>
+
+#include <openssl/e_os2.h>
+
#include "internal/endian.h"
static ossl_inline uint32_t load32(const uint8_t *src)
diff --git a/providers/implementations/include/prov/ciphercommon_ccm.h b/providers/implementations/include/prov/ciphercommon_ccm.h
index ffe2550644..2040eaade7 100644
--- a/providers/implementations/include/prov/ciphercommon_ccm.h
+++ b/providers/implementations/include/prov/ciphercommon_ccm.h
@@ -11,6 +11,10 @@
#define OSSL_PROV_CIPHERCOMMON_CCM_H
#pragma once
+#include <stddef.h>
+#include <stdint.h>
+
+#include "prov/ciphercommon.h"
#include "ciphercommon_aead.h"
typedef struct prov_ccm_hw_st PROV_CCM_HW;
diff --git a/providers/implementations/include/prov/ciphercommon_gcm.h b/providers/implementations/include/prov/ciphercommon_gcm.h
index 9763cf7b5c..ba5d0b5f87 100644
--- a/providers/implementations/include/prov/ciphercommon_gcm.h
+++ b/providers/implementations/include/prov/ciphercommon_gcm.h
@@ -12,7 +12,11 @@
#define OSSL_PROV_CIPHERCOMMON_GCM_H
#pragma once
+#include <stddef.h>
+#include <stdint.h>
+
#include <openssl/aes.h>
+#include "prov/ciphercommon.h"
#include "ciphercommon_aead.h"
typedef struct prov_gcm_hw_st PROV_GCM_HW;
diff --git a/providers/implementations/include/prov/ecx.h b/providers/implementations/include/prov/ecx.h
index 145f322c05..455554a5a4 100644
--- a/providers/implementations/include/prov/ecx.h
+++ b/providers/implementations/include/prov/ecx.h
@@ -7,6 +7,14 @@
* https://www.openssl.org/source/license.html
*/
+#if !defined(OSSL_PROVIDERS_IMPLEMENTATIONS_INCLUDE_PROV_ECX_H)
+#define OSSL_PROVIDERS_IMPLEMENTATIONS_INCLUDE_PROV_ECX_H
+
+#include <stddef.h>
+
+#include <openssl/bn.h>
+#include <openssl/ec.h>
+
#include "crypto/types.h"
#ifndef OPENSSL_NO_EC
@@ -29,3 +37,5 @@ int ossl_ecx_dhkem_derive_private(ECX_KEY *ecx, unsigned char *privout,
int ossl_ec_dhkem_derive_private(EC_KEY *ec, BIGNUM *privout,
const unsigned char *ikm, size_t ikmlen);
#endif
+
+#endif /* !defined(OSSL_PROVIDERS_IMPLEMENTATIONS_INCLUDE_PROV_ECX_H) */
diff --git a/providers/implementations/include/prov/file_store_local.h b/providers/implementations/include/prov/file_store_local.h
index d7f001d5cd..61047ba2ec 100644
--- a/providers/implementations/include/prov/file_store_local.h
+++ b/providers/implementations/include/prov/file_store_local.h
@@ -10,6 +10,8 @@
#if !defined(OSSL_PROVIDERS_IMPLEMENTATIONS_INCLUDE_PROV_FILE_STORE_LOCAL_H)
#define OSSL_PROVIDERS_IMPLEMENTATIONS_INCLUDE_PROV_FILE_STORE_LOCAL_H
+#include <openssl/types.h>
+
extern const OSSL_ALGORITHM ossl_any_to_obj_algorithm[];
#endif /* !defined(OSSL_PROVIDERS_IMPLEMENTATIONS_INCLUDE_PROV_FILE_STORE_LOCAL_H) */
diff --git a/providers/implementations/include/prov/lms_codecs.h b/providers/implementations/include/prov/lms_codecs.h
index cd25237984..6dfe9dff71 100644
--- a/providers/implementations/include/prov/lms_codecs.h
+++ b/providers/implementations/include/prov/lms_codecs.h
@@ -14,6 +14,7 @@
#ifndef OPENSSL_NO_LMS
#include <openssl/e_os2.h>
#include "crypto/lms.h"
+#include "prov/ciphercommon.h"
#include "prov/provider_ctx.h"
__owur LMS_KEY *