Re: svn commit: r1908433 - in /apr/apr/trunk: crypto/apr_crypto_openssl.c test/testcrypto.c

Yann Ylavic <[email protected]>
Newsgroups gmane.comp.apache.apr.devel
Message-ID <CAKQ1sVPuRChFVyTkQ_Xp-uuDLiqktxRKnwGXsKyq3hj8a6-paQ@mail.gmail.com>
On Thu, Mar 16, 2023 at 5:53 PM Ruediger Pluem <[email protected]> wrote:
>
> On 3/16/23 1:43 PM, [email protected] wrote:
> > Author: ylavic
> > Date: Thu Mar 16 12:43:17 2023
> > New Revision: 1908433
> >
> > URL: http://svn.apache.org/viewvc?rev=1908433&view=rev
> > Log:
> > apr_crypto_openssl: Compatibility with OpenSSL 3+
> >
> > Modified:
> >     apr/apr/trunk/crypto/apr_crypto_openssl.c
> >     apr/apr/trunk/test/testcrypto.c
>
> Why don't we need to call crypto_digest_cleanup any longer? Does the pool cleanup take of this now?

Cleanups were a bit scattered over normal/error exit codes while a
cleanup was always registered.
I missed that apr_crypto_block_t or apr_crypto_digest_t could be
reused in _init() though, so removing some cleanups here was leaky on
reuse.
I find it simpler/cleaner to do the cleanup or alloc+register in
_init() depending on reuse or not (respectively), so I did that in
r1908453 rather than restoring the cleanups as before.

Regards;
Yann.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.