diff options
author | tb <> | 2023-12-03 11:18:30 +0000 |
---|---|---|
committer | tb <> | 2023-12-03 11:18:30 +0000 |
commit | 872a37b58324189a9256ba4c78b1eabf7e497d47 (patch) | |
tree | eacbfa28916ec588a5f22bd3074d831941569c84 /src/lib/libcrypto | |
parent | e29fcb6e6e777c924634bc7569e138f01d8cc8fb (diff) | |
download | openbsd-872a37b58324189a9256ba4c78b1eabf7e497d47.tar.gz openbsd-872a37b58324189a9256ba4c78b1eabf7e497d47.tar.bz2 openbsd-872a37b58324189a9256ba4c78b1eabf7e497d47.zip |
Remove misuse warnings for EVP_*Final()
They make no sense. These are thin wrappers of EVP_*Final_ex() and behave
exactly the same way. The minor behavior difference of Init and Init_ex is
likely a historical artefact of this abomination of an API. Deprecation of
the Init functions was recently removed from the manpage. The only reason
to prefer the _ex versions over the normal versions is ENGINE. This is no
longer an argument.
The warnings were added in an attempt at adding automatic cleanup. This
broke stuff and was therefore backed out. The warnings remained.
discussed with schwarze
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/evp/evp_enc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index 04aa8f57a7..7c3f8c8648 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_enc.c,v 1.57 2023/12/01 06:53:18 tb Exp $ */ | 1 | /* $OpenBSD: evp_enc.c,v 1.58 2023/12/03 11:18:30 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 | * |
@@ -61,8 +61,6 @@ | |||
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include <string.h> | 62 | #include <string.h> |
63 | 63 | ||
64 | #include <sys/types.h> | ||
65 | |||
66 | #include <openssl/opensslconf.h> | 64 | #include <openssl/opensslconf.h> |
67 | 65 | ||
68 | #include <openssl/err.h> | 66 | #include <openssl/err.h> |
@@ -211,9 +209,6 @@ EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
211 | return EVP_DecryptFinal_ex(ctx, out, outl); | 209 | return EVP_DecryptFinal_ex(ctx, out, outl); |
212 | } | 210 | } |
213 | 211 | ||
214 | __warn_references(EVP_CipherFinal, | ||
215 | "EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup"); | ||
216 | |||
217 | int | 212 | int |
218 | EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 213 | EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
219 | { | 214 | { |
@@ -333,9 +328,6 @@ EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
333 | return 1; | 328 | return 1; |
334 | } | 329 | } |
335 | 330 | ||
336 | __warn_references(EVP_EncryptFinal, | ||
337 | "EVP_EncryptFinal is often misused, please use EVP_EncryptFinal_ex and EVP_CIPHER_CTX_cleanup"); | ||
338 | |||
339 | int | 331 | int |
340 | EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 332 | EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
341 | { | 333 | { |
@@ -458,9 +450,6 @@ EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
458 | return 1; | 450 | return 1; |
459 | } | 451 | } |
460 | 452 | ||
461 | __warn_references(EVP_DecryptFinal, | ||
462 | "EVP_DecryptFinal is often misused, please use EVP_DecryptFinal_ex and EVP_CIPHER_CTX_cleanup"); | ||
463 | |||
464 | int | 453 | int |
465 | EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 454 | EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
466 | { | 455 | { |