Merge pull request #1405 from ejohnstown/selftest-errors

added error codes for the FIPS pairwise agreement tests in the POST
This commit is contained in:
Chris Conlon
2018-02-28 14:16:59 -07:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@ -449,6 +449,15 @@ const char* wc_GetErrorString(int error)
case RSA_OUT_OF_RANGE_E:
return "Ciphertext to decrypt is out of range";
case RSAPSS_PAT_FIPS_E:
return "wolfcrypt FIPS RSA-PSS Pairwise Agreement Test Failure";
case ECDSA_PAT_FIPS_E:
return "wolfcrypt FIPS ECDSA Pairwise Agreement Test Failure";
case DH_KAT_FIPS_E:
return "wolfcrypt FIPS DH Known Answer Test Failure";
default:
return "unknown error number";

View File

@ -199,8 +199,11 @@ enum {
PRIME_GEN_E = -251, /* Failure finding a prime. */
BER_INDEF_E = -252, /* Cannot decode indefinite length BER. */
RSA_OUT_OF_RANGE_E = -253, /* Ciphertext to decrypt out of range. */
RSAPSS_PAT_FIPS_E = -254, /* RSA-PSS PAT failure */
ECDSA_PAT_FIPS_E = -255, /* ECDSA PAT failure */
DH_KAT_FIPS_E = -256, /* DH KAT failure */
WC_LAST_E = -253, /* Update this to indicate last error */
WC_LAST_E = -256, /* Update this to indicate last error */
MIN_CODE_E = -300 /* errors -101 - -299 */
/* add new companion error id strings for any new error codes