Re: using palloc/pfree for OpenSSL allocations with CRYPTO_set_mem_functions

2024-02-02 Thread Evan Czaplicki
Thank you for the explanation! I looked into what OpenSSL does when freeing the underlying OSSLCipher resources, and as you say, it is more than just a free. There is sometimes aditional values to free, and they go through and overwrite the data in a special way regardless. So I see why the TopMemo

Re: using palloc/pfree for OpenSSL allocations with CRYPTO_set_mem_functions

2024-02-01 Thread Tom Lane
Evan Czaplicki writes: > 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_real

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