[test] ECC: make sure negative tests pass for the right reasons
authorBilly Brumley <bbrumley@gmail.com>
Wed, 22 Aug 2018 06:50:43 +0000 (09:50 +0300)
committerNicola Tuveri <nic.tuv@gmail.com>
Sat, 29 Sep 2018 09:44:22 +0000 (12:44 +0300)
commite5d1825728e41dbd650b9969a40bace692010408
tree010a9055f55b8262da32a8fa9216de7b9f744360
parent23fe5c582a83bce394a3cdf0bc8f6f4f2eb71ebb
[test] ECC: make sure negative tests pass for the right reasons

This is a backport of #7028 to 1.1.0.

It squashes the two original commits and applies changes for
compatibility with 1.1.0.

1. cherry picked from commit 30c41bfb158c0f595809d0eaf032926a3c2cf236
    [test] ECC: make sure negative tests pass for the right reasons
2. cherry picked from commit bfb10b975818d1887d676d309fcc21a765611f6d
    [test] throw error from wrapper function instead of an EC_METHOD specific one

Given that in 1.1.0 `EC_POINT_get_affine_coordinates_GFp` and
`EC_POINT_get_affine_coordinates_GF2m` have not been unified, in this
backport the tests distinguish between the 2 different functions as the
cause of the expected error.

[extended tests] to trigger sanitizer checks and coverage analysis.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7152)
crypto/ec/ec_lib.c
test/recipes/30-test_evp_data/evppkey.txt
test/recipes/30-test_evp_data/evppkey_ecc.txt