aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac/hmactest.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-06-12 16:33:55 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-06-12 16:33:55 +0000
commit15533bcc3525a52ecfe00631bc36167d65c6b187 (patch)
tree68067a8cb2fa4cbe2fcc27f062dc580d6ab1bc33 /crypto/hmac/hmactest.c
parenta9745f9a849725cad34f84351bed202839aade59 (diff)
downloadsrc-15533bcc3525a52ecfe00631bc36167d65c6b187.tar.gz
src-15533bcc3525a52ecfe00631bc36167d65c6b187.zip
Import OpenSSL 1.0.1o.vendor/openssl/1.0.1o
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=284327 svn path=/vendor-crypto/openssl/1.0.1o/; revision=284328; tag=vendor/openssl/1.0.1o
Diffstat (limited to 'crypto/hmac/hmactest.c')
-rw-r--r--crypto/hmac/hmactest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/hmac/hmactest.c b/crypto/hmac/hmactest.c
index 86b6c2529fe2..271d0ebf264c 100644
--- a/crypto/hmac/hmactest.c
+++ b/crypto/hmac/hmactest.c
@@ -233,7 +233,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;