Merge pull request #6729 from ejohnstown/degraded-mode

FIPS Degraded Mode
This commit is contained in:
JacobBarthelmeh
2023-08-25 10:10:22 -06:00
committed by GitHub
3 changed files with 5 additions and 1 deletions

View File

@ -595,6 +595,9 @@ const char* wc_GetErrorString(int error)
case SM4_CCM_AUTH_E: case SM4_CCM_AUTH_E:
return "SM4-CCM Authentication check fail"; return "SM4-CCM Authentication check fail";
case DEGRADED_FIPS_E:
return "FIPS module in DEGRADED mode";
default: default:
return "unknown error number"; return "unknown error number";

View File

@ -2026,7 +2026,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void)
int i; int i;
int j = 0; int j = 0;
/* Values that are not or no longer error codes. */ /* 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, -163, -164, -165, -166, -167, -168, -169, -233,
0 }; 0 };

View File

@ -66,6 +66,7 @@ enum {
MEMORY_E = -125, /* out of memory error */ MEMORY_E = -125, /* out of memory error */
VAR_STATE_CHANGE_E = -126, /* var state modified by different thread */ 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_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */
RSA_BUFFER_E = -131, /* RSA buffer error, output too small or RSA_BUFFER_E = -131, /* RSA buffer error, output too small or