Using OPENSSL_secure_malloc in a library?

Antoine Pitrou <[email protected]>
Newsgroups gmane.comp.encryption.openssl.user
Message-ID <[email protected]>
Hello,

I maintain a library (Apache Arrow/Parquet) that uses OpenSSL. We would 
like to use OPENSSL_secure_malloc() for more secure storage of secrets. 
However, it seems that this usage relies on initializing a global heap 
using CRYPTO_secure_malloc_init(), and releasing it at process shutdown 
using CRYPTO_secure_malloc_done(). This is fine from an application, but 
such explicit process-wide initialization routines are inherently 
problematic to call from within a library (what if the application, or 
another library loaded by the application, also calls these initialization 
routines?).

Are there any guidelines to reliably use OPENSSL_secure_malloc() in a 
library?

Thanks

Antoine.

-- 
You received this message because you are subscribed to the Google Groups "openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openssl-users+unsubscribe-MCmKBN63+Bmbup2nOX2J7Q@public.gmane.org
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-users/65fe2e88-e241-4426-85b6-4ee5bb2e0611n%40openssl.org.
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.