diff options
Diffstat (limited to 'src/lib/libcrypto/evp')
-rw-r--r-- | src/lib/libcrypto/evp/evp_digest.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_key.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_pbe.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/m_sigver.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/p_sign.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/p_verify.c | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/libcrypto/evp/evp_digest.c b/src/lib/libcrypto/evp/evp_digest.c index 33ba923e72..3a349ad0e6 100644 --- a/src/lib/libcrypto/evp/evp_digest.c +++ b/src/lib/libcrypto/evp/evp_digest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_digest.c,v 1.9 2024/02/18 15:43:21 tb Exp $ */ | 1 | /* $OpenBSD: evp_digest.c,v 1.10 2024/02/18 15:45:42 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -123,7 +123,7 @@ | |||
123 | int | 123 | int |
124 | EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) | 124 | EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) |
125 | { | 125 | { |
126 | EVP_MD_CTX_init(ctx); | 126 | EVP_MD_CTX_legacy_clear(ctx); |
127 | return EVP_DigestInit_ex(ctx, type, NULL); | 127 | return EVP_DigestInit_ex(ctx, type, NULL); |
128 | } | 128 | } |
129 | 129 | ||
@@ -207,7 +207,7 @@ EVP_Digest(const void *data, size_t count, | |||
207 | EVP_MD_CTX ctx; | 207 | EVP_MD_CTX ctx; |
208 | int ret; | 208 | int ret; |
209 | 209 | ||
210 | EVP_MD_CTX_init(&ctx); | 210 | EVP_MD_CTX_legacy_clear(&ctx); |
211 | EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_ONESHOT); | 211 | EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_ONESHOT); |
212 | ret = EVP_DigestInit_ex(&ctx, type, NULL) && | 212 | ret = EVP_DigestInit_ex(&ctx, type, NULL) && |
213 | EVP_DigestUpdate(&ctx, data, count) && | 213 | EVP_DigestUpdate(&ctx, data, count) && |
@@ -294,7 +294,7 @@ EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) | |||
294 | int | 294 | int |
295 | EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) | 295 | EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) |
296 | { | 296 | { |
297 | EVP_MD_CTX_init(out); | 297 | EVP_MD_CTX_legacy_clear(out); |
298 | return EVP_MD_CTX_copy_ex(out, in); | 298 | return EVP_MD_CTX_copy_ex(out, in); |
299 | } | 299 | } |
300 | 300 | ||
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index 1f3d758268..f51584b84b 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_key.c,v 1.33 2024/01/05 10:18:52 tb Exp $ */ | 1 | /* $OpenBSD: evp_key.c,v 1.34 2024/02/18 15:45:42 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -156,7 +156,7 @@ EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, | |||
156 | if (data == NULL) | 156 | if (data == NULL) |
157 | return nkey; | 157 | return nkey; |
158 | 158 | ||
159 | EVP_MD_CTX_init(&c); | 159 | EVP_MD_CTX_legacy_clear(&c); |
160 | for (;;) { | 160 | for (;;) { |
161 | if (!EVP_DigestInit_ex(&c, md, NULL)) | 161 | if (!EVP_DigestInit_ex(&c, md, NULL)) |
162 | goto err; | 162 | goto err; |
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c index bb0c227ae7..eb8d5c4157 100644 --- a/src/lib/libcrypto/evp/evp_pbe.c +++ b/src/lib/libcrypto/evp/evp_pbe.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_pbe.c,v 1.41 2024/02/01 17:11:58 tb Exp $ */ | 1 | /* $OpenBSD: evp_pbe.c,v 1.42 2024/02/18 15:45:42 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -266,7 +266,7 @@ PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, | |||
266 | else if (passlen == -1) | 266 | else if (passlen == -1) |
267 | passlen = strlen(pass); | 267 | passlen = strlen(pass); |
268 | 268 | ||
269 | EVP_MD_CTX_init(&ctx); | 269 | EVP_MD_CTX_legacy_clear(&ctx); |
270 | 270 | ||
271 | if (!EVP_DigestInit_ex(&ctx, md, NULL)) | 271 | if (!EVP_DigestInit_ex(&ctx, md, NULL)) |
272 | goto err; | 272 | goto err; |
diff --git a/src/lib/libcrypto/evp/m_sigver.c b/src/lib/libcrypto/evp/m_sigver.c index 3ce7f7e2a6..a72671ed92 100644 --- a/src/lib/libcrypto/evp/m_sigver.c +++ b/src/lib/libcrypto/evp/m_sigver.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: m_sigver.c,v 1.14 2023/11/29 21:35:57 tb Exp $ */ | 1 | /* $OpenBSD: m_sigver.c,v 1.15 2024/02/18 15:45:42 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -171,7 +171,7 @@ EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) | |||
171 | EVP_MD_CTX tmp_ctx; | 171 | EVP_MD_CTX tmp_ctx; |
172 | unsigned char md[EVP_MAX_MD_SIZE]; | 172 | unsigned char md[EVP_MAX_MD_SIZE]; |
173 | unsigned int mdlen = 0; | 173 | unsigned int mdlen = 0; |
174 | EVP_MD_CTX_init(&tmp_ctx); | 174 | EVP_MD_CTX_legacy_clear(&tmp_ctx); |
175 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) | 175 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) |
176 | return 0; | 176 | return 0; |
177 | if (sctx) | 177 | if (sctx) |
@@ -228,7 +228,7 @@ EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen) | |||
228 | vctx = 1; | 228 | vctx = 1; |
229 | else | 229 | else |
230 | vctx = 0; | 230 | vctx = 0; |
231 | EVP_MD_CTX_init(&tmp_ctx); | 231 | EVP_MD_CTX_legacy_clear(&tmp_ctx); |
232 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) | 232 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) |
233 | return -1; | 233 | return -1; |
234 | if (vctx) { | 234 | if (vctx) { |
diff --git a/src/lib/libcrypto/evp/p_sign.c b/src/lib/libcrypto/evp/p_sign.c index f7c21178a0..f6d6e12a30 100644 --- a/src/lib/libcrypto/evp/p_sign.c +++ b/src/lib/libcrypto/evp/p_sign.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_sign.c,v 1.19 2023/07/07 19:37:54 beck Exp $ */ | 1 | /* $OpenBSD: p_sign.c,v 1.20 2024/02/18 15:45:42 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -77,7 +77,7 @@ EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | |||
77 | int ret = 0; | 77 | int ret = 0; |
78 | 78 | ||
79 | *siglen = 0; | 79 | *siglen = 0; |
80 | EVP_MD_CTX_init(&tmp_ctx); | 80 | EVP_MD_CTX_legacy_clear(&tmp_ctx); |
81 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) | 81 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) |
82 | goto err; | 82 | goto err; |
83 | if (!EVP_DigestFinal_ex(&tmp_ctx, &(m[0]), &m_len)) | 83 | if (!EVP_DigestFinal_ex(&tmp_ctx, &(m[0]), &m_len)) |
diff --git a/src/lib/libcrypto/evp/p_verify.c b/src/lib/libcrypto/evp/p_verify.c index da7ab5425a..ed9b3700fe 100644 --- a/src/lib/libcrypto/evp/p_verify.c +++ b/src/lib/libcrypto/evp/p_verify.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_verify.c,v 1.18 2023/07/07 19:37:54 beck Exp $ */ | 1 | /* $OpenBSD: p_verify.c,v 1.19 2024/02/18 15:45:42 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -75,7 +75,7 @@ EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, | |||
75 | EVP_PKEY_CTX *pkctx = NULL; | 75 | EVP_PKEY_CTX *pkctx = NULL; |
76 | int ret = 0; | 76 | int ret = 0; |
77 | 77 | ||
78 | EVP_MD_CTX_init(&tmp_ctx); | 78 | EVP_MD_CTX_legacy_clear(&tmp_ctx); |
79 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) | 79 | if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx)) |
80 | goto err; | 80 | goto err; |
81 | if (!EVP_DigestFinal_ex(&tmp_ctx, &(m[0]), &m_len)) | 81 | if (!EVP_DigestFinal_ex(&tmp_ctx, &(m[0]), &m_len)) |