summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-11-18 20:11:56 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-11-18 20:11:56 +0000
commit27322325897baf8c6c2fcf5c847ccb5e645167d0 (patch)
treeeb676b2753f65e30f1f6eba02faf276df51b74cd /regress
parentfb44443de317187d58e89a7464de1d1027d232fc (diff)
Use HMAC_CTX_reset() instead of HMAC_CTX_cleanup() + HMAC_CTX_init()
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libcrypto/hmac/hmactest.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/regress/lib/libcrypto/hmac/hmactest.c b/regress/lib/libcrypto/hmac/hmactest.c
index 58fa9f593b0..f61a177e1b5 100644
--- a/regress/lib/libcrypto/hmac/hmactest.c
+++ b/regress/lib/libcrypto/hmac/hmactest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hmactest.c,v 1.6 2021/11/18 15:20:33 tb Exp $ */
+/* $OpenBSD: hmactest.c,v 1.7 2021/11/18 20:11:55 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -192,8 +192,7 @@ main(int argc, char *argv[])
}
printf("test 4 ok\n");
test5:
- HMAC_CTX_cleanup(ctx);
- HMAC_CTX_init(ctx);
+ HMAC_CTX_reset(ctx);
if (HMAC_Init_ex(ctx, test[4].key, test[4].key_len, NULL, NULL)) {
printf("Should fail to initialise HMAC with empty MD (test 5)\n");
err++;
@@ -282,8 +281,7 @@ main(int argc, char *argv[])
printf("test 5 ok\n");
}
test6:
- HMAC_CTX_cleanup(ctx);
- HMAC_CTX_init(ctx);
+ HMAC_CTX_reset(ctx);
if (!HMAC_Init_ex(ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) {
printf("Failed to initialise HMAC (test 6)\n");
err++;