diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index 80b3469ad..90c87b7ca 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -595,6 +595,9 @@ const char* wc_GetErrorString(int error) case SM4_CCM_AUTH_E: return "SM4-CCM Authentication check fail"; + case DEGRADED_FIPS_E: + return "FIPS module in DEGRADED mode"; + default: return "unknown error number"; diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 3863ba5fa..cedc87a7f 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -2026,7 +2026,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void) int i; int j = 0; /* Values that are not or no longer error codes. */ - int missing[] = { -122, -123, -124, -127, -128, -129, -159, + int missing[] = { -122, -123, -124, -128, -129, -159, -163, -164, -165, -166, -167, -168, -169, -233, 0 }; diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index ac6186d5c..99035cc26 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -66,6 +66,7 @@ enum { MEMORY_E = -125, /* out of memory error */ VAR_STATE_CHANGE_E = -126, /* var state modified by different thread */ + DEGRADED_FIPS_E = -127, /* FIPS Module in degraded mode */ RSA_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */ RSA_BUFFER_E = -131, /* RSA buffer error, output too small or