mirror of https://github.com/openssl/openssl.git
ml-kem: convert to transient error state on import failure in FIPS provider
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/28376)
This commit is contained in:
parent
56a791209c
commit
eaba675c4b
|
@ -482,7 +482,7 @@ static int ml_kem_import(void *vkey, int selection, const OSSL_PARAM params[])
|
|||
if (res > 0 && include_private
|
||||
&& !ml_kem_pairwise_test(key, key->prov_flags)) {
|
||||
#ifdef FIPS_MODULE
|
||||
ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
|
||||
ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT_IMPORT);
|
||||
#endif
|
||||
ossl_ml_kem_key_reset(key);
|
||||
res = 0;
|
||||
|
@ -509,7 +509,7 @@ static const OSSL_PARAM *ml_kem_gettable_params(void *provctx)
|
|||
}
|
||||
|
||||
#ifndef FIPS_MODULE
|
||||
void *ml_kem_load(const void *reference, size_t reference_sz)
|
||||
static void *ml_kem_load(const void *reference, size_t reference_sz)
|
||||
{
|
||||
ML_KEM_KEY *key = NULL;
|
||||
uint8_t *encoded_dk = NULL;
|
||||
|
|
Loading…
Reference in New Issue