FIPS Degraded Mode

1. Add error code for entering FIPS degraded mode.
2. Add string for the error code.
This commit is contained in:
John Safranek 2023-07-13 09:20:03 -07:00
parent a6257ca635
commit e48b7ef3d7
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
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:
return "SM4-CCM Authentication check fail";
case DEGRADED_FIPS_E:
return "FIPS module in DEGRADED mode";
default:
return "unknown error number";

View File

@ -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 };

View File

@ -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