Hello Antoine,
On Thu, Apr 03, 2025 at 03:21:26AM -0700, Antoine Pitrou wrote:
</snip>
>
> Are there any guidelines to reliably use OPENSSL_secure_malloc() in a
> library?
>
I'm not aware of any guidelines on how to use OPENSSL_secure_malloc() in
library. I took a look at the source code and indeed the secure memory
is global. Your question feels like feature request to allow other
components/libraries create their own secure memory instances.
Either by introducing a new CRYPTP_secure__malloc_init() variant which
will return a handle/pointer to secure heap or adding secure heap to
library context. I think both those approaches would be safe for your
usecase.
thanks and
regards
sashan