ECDH POST selftest failure inducing support.

This commit is contained in:
Dr. Stephen Henson 2011-10-12 13:17:19 +00:00
parent cf61940534
commit c1f63b5cb3
2 changed files with 5 additions and 0 deletions

View file

@ -214,6 +214,9 @@ int FIPS_selftest_ecdh(void)
goto err;
}
if (!fips_post_corrupt(FIPS_TEST_ECDH, ecd->curve, NULL))
ztmp[0] ^= 0x1;
if (memcmp(ztmp, ecd->z, ecd->zlen))
{
fips_post_failed(FIPS_TEST_ECDH, ecd->curve, 0);

View file

@ -1017,6 +1017,8 @@ int main(int argc,char **argv)
} else if (!strcmp(argv[1], "dsa")) {
fail_id = FIPS_TEST_SIGNATURE;
fail_key = EVP_PKEY_DSA;
} else if (!strcmp(argv[1], "ecdh")) {
fail_id = FIPS_TEST_ECDH;
} else if (!strcmp(argv[1], "ecdsa")) {
fail_id = FIPS_TEST_SIGNATURE;
fail_key = EVP_PKEY_EC;