Skip to content

Commit b20c6c5

Browse files
Merge pull request #6729 from ejohnstown/degraded-mode
FIPS Degraded Mode
2 parents 14deb7a + e48b7ef commit b20c6c5

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

wolfcrypt/src/error.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ const char* wc_GetErrorString(int error)
595595
case SM4_CCM_AUTH_E:
596596
return "SM4-CCM Authentication check fail";
597597

598+
case DEGRADED_FIPS_E:
599+
return "FIPS module in DEGRADED mode";
600+
598601
default:
599602
return "unknown error number";
600603

wolfcrypt/test/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2026,7 +2026,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void)
20262026
int i;
20272027
int j = 0;
20282028
/* Values that are not or no longer error codes. */
2029-
int missing[] = { -122, -123, -124, -127, -128, -129, -159,
2029+
int missing[] = { -122, -123, -124, -128, -129, -159,
20302030
-163, -164, -165, -166, -167, -168, -169, -233,
20312031
0 };
20322032

wolfssl/wolfcrypt/error-crypt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ enum {
6666

6767
MEMORY_E = -125, /* out of memory error */
6868
VAR_STATE_CHANGE_E = -126, /* var state modified by different thread */
69+
DEGRADED_FIPS_E = -127, /* FIPS Module in degraded mode */
6970

7071
RSA_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */
7172
RSA_BUFFER_E = -131, /* RSA buffer error, output too small or

0 commit comments

Comments
 (0)