]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ecx: convert to transient error state on import failure in FIPS provider
authorPauli <ppzgs1@gmail.com>
Fri, 29 Aug 2025 02:42:46 +0000 (12:42 +1000)
committerNeil Horman <nhorman@openssl.org>
Sat, 30 Aug 2025 13:23:34 +0000 (09:23 -0400)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28376)

(cherry picked from commit 811f68ffe2cb97ab997c11b0429236135eb437c0)

providers/implementations/keymgmt/ecx_kmgmt.c

index faf25606e33a6ecf6711589acd080cbd84a44944..e6d326a907055e1aeab17f11627b7554591a9acf 100644 (file)
@@ -223,7 +223,7 @@ static int ecx_import(void *keydata, int selection, const OSSL_PARAM params[])
         if (key->haspubkey && key->privkey != NULL) {
             ok = ecd_fips140_pairwise_test(key, key->type, 1);
             if (ok <= 0)
-                ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
+                ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT_IMPORT);
         }
 #endif  /* FIPS_MODULE */
     return ok;