From d035c1dd81f39e980e105630ea2fc9dfa9b02b0e Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 28 Feb 2018 10:54:53 -0800 Subject: [PATCH] added error code for the FIPS DH agreement KAT test in the POST --- wolfcrypt/src/error.c | 3 +++ wolfssl/wolfcrypt/error-crypt.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index 331562b13..4380bd019 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -455,6 +455,9 @@ const char* wc_GetErrorString(int error) 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"; diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 04bc9d4d9..378ec4c72 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -201,8 +201,9 @@ enum { 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 = -255, /* 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