You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ruediger Pluem <rp...@apache.org> on 2023/03/16 16:53:24 UTC

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


On 3/16/23 1:43 PM, ylavic@apache.org 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?

Regards

Rüdiger


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

Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Mar 16, 2023 at 5:53 PM Ruediger Pluem <rp...@apache.org> wrote:
>
> On 3/16/23 1:43 PM, ylavic@apache.org 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.