Rename the PCT error codes to remove 'FIPS' since they can be enabled without FIPS.

This commit is contained in:
John Safranek
2021-03-26 10:49:52 -07:00
committed by Daniel Pouzzner
parent 9c5607a677
commit 86c040a3ae
4 changed files with 8 additions and 8 deletions

View File

@@ -1349,7 +1349,7 @@ static int wc_DhGenerateKeyPair_Sync(DhKey* key, WC_RNG* rng,
ret = _ffc_validate_public_key(key, pub, *pubSz, NULL, 0, 0);
if (ret == 0) {
ret = _ffc_pairwise_consistency_test(key, pub, *pubSz, priv, *privSz);
if (ret != 0) ret = DHE_PCT_FIPS_E;
if (ret != 0) ret = DHE_PCT_E;
}
return ret;

View File

@@ -8302,7 +8302,7 @@ static int _ecc_pairwise_consistency_test(ecc_key* key)
int err = 0;
if (ecc_check_privkey_gen_helper(key) != 0)
err = ECC_PCT_FIPS_E;
err = ECC_PCT_E;
return err;
}

View File

@@ -545,11 +545,11 @@ const char* wc_GetErrorString(int error)
case KDF_SSH_KAT_FIPS_E:
return "wolfcrypt FIPS SSH KDF Known Answer Test Failure";
case DHE_PCT_FIPS_E:
return "wolfcrypt FIPS DHE Pairwise Consistency Test Failure";
case DHE_PCT_E:
return "wolfcrypt DHE Pairwise Consistency Test Failure";
case ECC_PCT_FIPS_E:
return "wolfcrypt FIPS ECDHE Pairwise Consistency Test Failure";
case ECC_PCT_E:
return "wolfcrypt ECDHE Pairwise Consistency Test Failure";
default:
return "unknown error number";

View File

@@ -243,8 +243,8 @@ enum {
KDF_TLS12_KAT_FIPS_E = -282, /* TLS12 KDF KAT failure */
KDF_TLS13_KAT_FIPS_E = -283, /* TLS13 KDF KAT failure */
KDF_SSH_KAT_FIPS_E = -284, /* SSH KDF KAT failure */
DHE_PCT_FIPS_E = -285, /* DHE Pairwise Consistency Test failure */
ECC_PCT_FIPS_E = -286, /* ECDHE Pairwise Consistency Test failure */
DHE_PCT_E = -285, /* DHE Pairwise Consistency Test failure */
ECC_PCT_E = -286, /* ECDHE Pairwise Consistency Test failure */
WC_LAST_E = -286, /* Update this to indicate last error */
MIN_CODE_E = -300 /* errors -101 - -299 */