Commit 13ee7ea997 for openssl.org
commit 13ee7ea997d399cc7c3868428aad929da92450b9
Author: Neil Horman <nhorman@openssl.org>
Date: Fri Feb 20 05:48:53 2026 -0500
Fix broken strict-warnings build in sskdf and x963kdf
when configuring with:
./Configure no-sskdf --strict-warnings
The build breaks as sskdf_new is defined but not used (as the same sskdf
file is used to implement x963kdf with a different new dispatch
function). i.e. we will build the file when sskdf is disabled but
x963kdf is enabled, omitting any use of sskdf_new
Easy fix, just gate the inclusion of sskdf_new on #ifndef
OPENSSL_NO_SSKDF.
Do the same for X963KDF, which has the same problem (thank you for
pointing that out @t8m)
Fixes #30105
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Sun Feb 22 17:46:00 2026
(Merged from https://github.com/openssl/openssl/pull/30106)
diff --git a/providers/implementations/kdfs/sskdf.c b/providers/implementations/kdfs/sskdf.c
index 1747d95c1a..2626ce9d0e 100644
--- a/providers/implementations/kdfs/sskdf.c
+++ b/providers/implementations/kdfs/sskdf.c
@@ -88,8 +88,12 @@ struct sskdf_all_set_ctx_params_st {
};
static OSSL_FUNC_kdf_newctx_fn sskdf_common_new;
+#ifndef OPENSSL_NO_SSKDF
static OSSL_FUNC_kdf_newctx_fn sskdf_new;
+#endif
+#ifndef OPENSSL_NO_X963KDF
static OSSL_FUNC_kdf_newctx_fn x963_new;
+#endif
static OSSL_FUNC_kdf_dupctx_fn sskdf_dup;
static OSSL_FUNC_kdf_freectx_fn sskdf_free;
static OSSL_FUNC_kdf_reset_fn sskdf_reset;
@@ -334,6 +338,7 @@ static void *sskdf_common_new(void *provctx)
return ctx;
}
+#ifndef OPENSSL_NO_SSKDF
static void *sskdf_new(void *provctx)
{
#ifdef FIPS_MODULE
@@ -344,7 +349,9 @@ static void *sskdf_new(void *provctx)
return sskdf_common_new(provctx);
}
+#endif
+#ifndef OPENSSL_NO_X963KDF
static void *x963_new(void *provctx)
{
#ifdef FIPS_MODULE
@@ -355,6 +362,7 @@ static void *x963_new(void *provctx)
return sskdf_common_new(provctx);
}
+#endif
static void sskdf_reset(void *vctx)
{