summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-11-18 21:37:57 +0000
committertb <>2021-11-18 21:37:57 +0000
commit3311f461e9cad69855a601eb8afc8b5468e0b18c (patch)
treef80e92144a54c81f02141d48b64f5143a8874102 /src
parentba8c2da70ecaaa909e28b8df150a7f3d30e56a45 (diff)
downloadopenbsd-3311f461e9cad69855a601eb8afc8b5468e0b18c.tar.gz
openbsd-3311f461e9cad69855a601eb8afc8b5468e0b18c.tar.bz2
openbsd-3311f461e9cad69855a601eb8afc8b5468e0b18c.zip
sha512test: replace EVP_MD_CTX_{cleanup,init} pair with EVP_MD_CTX_reset
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/sha512/sha512test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/sha512/sha512test.c b/src/regress/lib/libcrypto/sha512/sha512test.c
index 9f0e7419d7..f8e37a20fa 100644
--- a/src/regress/lib/libcrypto/sha512/sha512test.c
+++ b/src/regress/lib/libcrypto/sha512/sha512test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha512test.c,v 1.5 2021/11/18 15:23:24 tb Exp $ */ 1/* $OpenBSD: sha512test.c,v 1.6 2021/11/18 21:37:57 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved.
4 * ==================================================================== 4 * ====================================================================
@@ -141,7 +141,7 @@ main(int argc, char **argv) {
141 "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa", 141 "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa",
142 (1000000 - i) < 288 ? 1000000 - i : 288); 142 (1000000 - i) < 288 ? 1000000 - i : 288);
143 EVP_DigestFinal_ex(evp, md, NULL); 143 EVP_DigestFinal_ex(evp, md, NULL);
144 EVP_MD_CTX_cleanup(evp); 144 EVP_MD_CTX_reset(evp);
145 145
146 if (memcmp(md, app_c3, sizeof(app_c3))) { 146 if (memcmp(md, app_c3, sizeof(app_c3))) {
147 fflush(stdout); 147 fflush(stdout);
@@ -179,7 +179,6 @@ main(int argc, char **argv) {
179 fprintf(stdout, "."); 179 fprintf(stdout, ".");
180 fflush(stdout); 180 fflush(stdout);
181 181
182 EVP_MD_CTX_init(evp);
183 EVP_DigestInit_ex(evp, EVP_sha384(), NULL); 182 EVP_DigestInit_ex(evp, EVP_sha384(), NULL);
184 for (i = 0; i < 1000000; i += 64) 183 for (i = 0; i < 1000000; i += 64)
185 EVP_DigestUpdate(evp, 184 EVP_DigestUpdate(evp,