From: tb Date: Sun, 3 Dec 2023 11:18:30 +0000 (+0000) Subject: Remove misuse warnings for EVP_*Final() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4010795e8dad898f211d3beee5dd0c0b2b0409dc;p=openbsd 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 --- diff --git a/lib/libcrypto/evp/evp_enc.c b/lib/libcrypto/evp/evp_enc.c index 04aa8f57a70..7c3f8c86489 100644 --- a/lib/libcrypto/evp/evp_enc.c +++ b/lib/libcrypto/evp/evp_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_enc.c,v 1.57 2023/12/01 06:53:18 tb Exp $ */ +/* $OpenBSD: evp_enc.c,v 1.58 2023/12/03 11:18:30 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,8 +61,6 @@ #include #include -#include - #include #include @@ -211,9 +209,6 @@ EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) return EVP_DecryptFinal_ex(ctx, out, outl); } -__warn_references(EVP_CipherFinal, - "EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup"); - int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { @@ -333,9 +328,6 @@ EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, return 1; } -__warn_references(EVP_EncryptFinal, - "EVP_EncryptFinal is often misused, please use EVP_EncryptFinal_ex and EVP_CIPHER_CTX_cleanup"); - int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { @@ -458,9 +450,6 @@ EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, return 1; } -__warn_references(EVP_DecryptFinal, - "EVP_DecryptFinal is often misused, please use EVP_DecryptFinal_ex and EVP_CIPHER_CTX_cleanup"); - int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) {