From 5cc046eb6dbdbcbe89e52de1fead4258a71decc1 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 27 Feb 2018 12:42:25 -0800 Subject: [PATCH] added error codes for the FIPS pairwise agreement tests in the POST --- wolfcrypt/src/error.c | 6 ++++++ wolfssl/wolfcrypt/error-crypt.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index 9071c638f..331562b13 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -449,6 +449,12 @@ 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"; + default: return "unknown error number"; diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 069d09e67..04bc9d4d9 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -199,8 +199,10 @@ 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 */ - WC_LAST_E = -253, /* Update this to indicate last error */ + WC_LAST_E = -255, /* Update this to indicate last error */ MIN_CODE_E = -300 /* errors -101 - -299 */ /* add new companion error id strings for any new error codes