Commit 1300f36c55 for openssl.org
commit 1300f36c559a74d28ac1e74b166bcb22429d97db
Author: simo Sorce <simo@redhat.com>
Date: Thu Oct 1 16:23:46 2026 -0400
Ensure self test is executed before SLH-DSA KeyGen
Signed-off-by: simo Sorce <simo@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Sat Oct 10 10:29:15 2026
(Merged from https://github.com/openssl/openssl/pull/33074)
diff --git a/providers/implementations/keymgmt/slh_dsa_kmgmt.c b/providers/implementations/keymgmt/slh_dsa_kmgmt.c
index 559df639f3..e1473fe962 100644
--- a/providers/implementations/keymgmt/slh_dsa_kmgmt.c
+++ b/providers/implementations/keymgmt/slh_dsa_kmgmt.c
@@ -361,7 +361,7 @@ static void *slh_dsa_gen(void *genctx, const char *alg)
SLH_DSA_KEY *key = NULL;
SLH_DSA_HASH_CTX *ctx = NULL;
- if (!ossl_prov_is_running())
+ if (!slh_dsa_self_check(gctx->libctx))
return NULL;
key = ossl_slh_dsa_key_new(gctx->libctx, gctx->propq, alg);
if (key == NULL)