As required by FIPS 140-3 AS10.07, if the module fails a self-test, it
shall enter an error state.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27436)
goto err;
}
#ifdef FIPS_MODULE
- if (!ml_dsa_pairwise_test(key))
+ if (!ml_dsa_pairwise_test(key)) {
+ ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
goto err;
+ }
#endif
return key;
err:
gctx->entropy, gctx->entropy_len))
goto err;
#ifdef FIPS_MODULE
- if (!slh_dsa_fips140_pairwise_test(ctx, key, gctx->libctx))
+ if (!slh_dsa_fips140_pairwise_test(ctx, key, gctx->libctx)) {
+ ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
goto err;
+ }
#endif /* FIPS_MODULE */
ossl_slh_dsa_hash_ctx_free(ctx);
return key;