diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index 2a076978cc..d5871dc31c 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -741,6 +741,13 @@ const char* wc_GetErrorString(int error) case KMAC_MIN_KEYLEN_E: return "FIPS Mode KMAC Minimum Key Length error"; + case FIPS_BAD_VALUE_E: + return "Supplied value was rejected by FIPS policy"; + + case FIPS_UNAPPROVED_E: + return "Requested operation succeeded, but supplied" + "parameters are unapproved for FIPS"; + case MAX_CODE_E: case WC_SPAN1_MIN_CODE_E: case MIN_CODE_E: diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index e3f091ff73..b45582e9f8 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -345,9 +345,12 @@ enum wolfCrypt_ErrorCodes { AES_KW_KAT_FIPS_E = -1024, /* AES Key Wrap KAT failure */ FIPS_WRONG_API_E = -1025, /* Requested API is not allowed in FIPS mode */ KMAC_MIN_KEYLEN_E = -1026, /* FIPS Mode KMAC Minimum Key Length error */ + FIPS_BAD_VALUE_E = -1027, /* Supplied value was rejected by FIPS policy */ + FIPS_UNAPPROVED_E = -1028, /* Requested operation succeeded, but supplied */ + /* parameters are unapproved for FIPS */ - WC_SPAN2_LAST_E = -1026, /* Update to indicate last used error code */ - WC_LAST_E = -1026, /* the last code used either here or in + WC_SPAN2_LAST_E = -1028, /* Update to indicate last used error code */ + WC_LAST_E = -1028, /* the last code used either here or in * error-ssl.h */ WC_SPAN2_MIN_CODE_E = -1999, /* Last usable code in span 2 */