Re: using palloc/pfree for OpenSSL allocations with CRYPTO_set_mem_functions

2024-02-02 Thread Evan Czaplicki
ave a much clear understanding of the TopMemoryContext approach! Evan On Thu, Feb 1, 2024 at 5:01 PM Tom Lane wrote: > Evan Czaplicki writes: > > I noticed that OpenSSL has a CRYPTO_set_mem_functions > > <https://www.openssl.org/docs/man3.2/man3/CRYPTO_set_mem_functions.html&g

using palloc/pfree for OpenSSL allocations with CRYPTO_set_mem_functions

2024-02-01 Thread Evan Czaplicki
I noticed that OpenSSL has a CRYPTO_set_mem_functions function: If no allocations have been done, it is possible to “swap out” the default > implementations for OPENSSL_malloc(), OPENSSL_realloc() and OPENSSL_free() > and rep