Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26838)
#include <openssl/self_test.h>
#include <openssl/param_build.h>
#include "crypto/ml_kem.h"
+#include "internal/fips.h"
#include "internal/param_build_set.h"
#include "prov/implementations.h"
#include "prov/providercommon.h"
|| (key_flags & ML_KEM_KEY_PCT_TYPE) == 0)
return 1;
#ifdef FIPS_MODULE
+ /* During self test, it is a waste to do this test */
+ if (ossl_fips_self_testing())
+ return 1;
+
/*
* The functions `OSSL_SELF_TEST_*` will return directly if parameter `st`
* is NULL.