ECDH POST selftest failure inducing support.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 12 Oct 2011 13:17:19 +0000 (13:17 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 12 Oct 2011 13:17:19 +0000 (13:17 +0000)
fips/ecdh/fips_ecdh_selftest.c
fips/fips_test_suite.c

index b46ae3b..2b21cea 100644 (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);
index c768de7..54a59c3 100644 (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;