diff options
author | Matt Caswell <matt@openssl.org> | 2015-06-12 14:08:04 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-06-12 14:16:09 +0200 |
commit | 4b464e7b46682f568a5df550426b0cf4b22e2485 (patch) | |
tree | e68dd3b990976cb8201b2f76d758272ab014213c /test/hmactest.c | |
parent | Update CHANGES and NEWS (diff) | |
download | openssl-4b464e7b46682f568a5df550426b0cf4b22e2485.tar.xz openssl-4b464e7b46682f568a5df550426b0cf4b22e2485.zip |
Fix ABI break with HMAC
Recent HMAC changes broke ABI compatibility due to a new field in HMAC_CTX.
This backs that change out, and does it a different way.
Thanks to Timo Teras for the concept.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/hmactest.c')
-rw-r--r-- | test/hmactest.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/hmactest.c b/test/hmactest.c index 13344d69e5..a9b829d078 100644 --- a/test/hmactest.c +++ b/test/hmactest.c @@ -226,7 +226,12 @@ test5: err++; goto test6; } - if (!HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) { + if (HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) { + printf("Should disallow changing MD without a new key (test 5)\n"); + err++; + goto test6; + } + if (!HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) { printf("Failed to reinitialise HMAC (test 5)\n"); err++; goto test6; |