]> git.ipfire.org Git - thirdparty/openssl.git/commit
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:58:34 +0000 (07:58 +0100)
commitcfe271e2b89658e6980e7d054bde9c164f2e8687
treea0f7a82dafc06bf6fad89beb99b28111f878998b
parentfc87d5dad26b4ad3351ed006024f9c48deebccb5
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)

(cherry picked from commit 5fbe15fd3b7c90a0cfb9f00be16225d8ed18b0dd)
test/evp_extra_test.c