diff options
author | Richard Levitte <levitte@openssl.org> | 2018-10-26 13:42:40 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-10-29 17:29:30 +0100 |
commit | ce5d64c79c4d809ece8fe28a5b62915467a1c0e1 (patch) | |
tree | 29bddd013288c511e5634924938592c82c136bca /test/recipes/30-test_evp_data | |
parent | Add a test where we reuse the EVP_PKEY_CTX for two HKDF test runs (diff) | |
download | openssl-ce5d64c79c4d809ece8fe28a5b62915467a1c0e1.tar.xz openssl-ce5d64c79c4d809ece8fe28a5b62915467a1c0e1.zip |
test/evp_test.c: don't misuse pkey_test_ctrl() in mac_test_run()
pkey_test_ctrl() was designed for parsing values, not for using in
test runs. Relying on its returned value when it returned 1 even for
control errors made it particularly useless for mac_test_run().
Here, it gets replaced with a MAC specific control function, that
parses values the same way but is designed for use in a _run() rather
than a _parse() function.
This uncovers a SipHash test with an invalid control that wasn't
caught properly. After all, that stanza is supposed to test that
invalid control values do generate an error. Now we catch that.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7500)
Diffstat (limited to 'test/recipes/30-test_evp_data')
-rw-r--r-- | test/recipes/30-test_evp_data/evpmac.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/recipes/30-test_evp_data/evpmac.txt b/test/recipes/30-test_evp_data/evpmac.txt index 6864070b37..4ec5fa425c 100644 --- a/test/recipes/30-test_evp_data/evpmac.txt +++ b/test/recipes/30-test_evp_data/evpmac.txt @@ -157,8 +157,7 @@ Output = 5150d1772f50834a503e069a973fbd7c MAC = SipHash Ctrl = digestsize:13 Key = 000102030405060708090A0B0C0D0E0F -Input = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E -Output = 5150d1772f50834a503e069a973fbd7c +Result = EVPPKEYCTXCTRL_ERROR Title = HMAC tests (from RFC2104 and others) |