mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-18 14:59:48 +02:00
wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c: add FIPS_BAD_VALUE_E
"Supplied value was rejected by FIPS policy" and FIPS_UNAPPROVED_E "Requested operation succeeded, but supplied parameters are unapproved for FIPS". The first is a new fatal error, the second is a new nonfatal error to which WC_FIPS_NOT_APPROVED will be bound.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user