test/evp_extra_test.c: Refactor test_fromdata()
authorRichard Levitte <levitte@openssl.org>
Fri, 10 Dec 2021 12:15:10 +0000 (13:15 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 13 Dec 2021 06:52:53 +0000 (07:52 +0100)
commit5fbe15fd3b7c90a0cfb9f00be16225d8ed18b0dd
tree0bb7bc3a49916cd7e03b6c20e5e4af052e962c91
parente67254e4c3d82b1b8f5102bc4a0e7914f0b87ef0
test/evp_extra_test.c: Refactor test_fromdata()

test_fromdata() turns out to be a bit inflexible, so we split it into
two functions, make_key_fromdata() and test_selection(), and adjust
test_EVP_PKEY_ffc_priv_pub() and test_EC_priv_pub() accordingly.  This
allows us to check the resulting keys further, not only to check that
the bits we expect are there, but also that the bits that we expect
not to be there to actually not be there!

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16765)
test/evp_extra_test.c