aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/crypto_callback.c
AgeCommit message (Collapse)Author
2015-06-18Change license text to APLv2Bruce Yinhe
2014-06-17crypto: Fix crypto for debug and valgrindSverker Eriksson
without relying on opt-version has been built. Removed ASSERT to make crypto_callback.debug.so work without dynamic linking to libcrypto.so.
2014-02-05crypto: Abort VM if out of memorySverker Eriksson
Nice crash instead of segv or worse.
2012-10-22crypto: Link crypto_callback staticallySverker Eriksson
if static linking of openssl is used.
2012-10-09crypto: Make unloading of crypto saferSverker Eriksson
Facts: crypto nif-lib registers callback functions that openssl uses for memory management and thread synchronization. The callback functions can only be set once, openssl does not allow changing the callback functions. Problem: If openssl is dynamicly linked to crypto, you might get s scenario where the crypto lib is unloaded while leaving openssl loaded with its old pointers to the unloaded crypto code intact. If crypto is then reloaded (by init:restart() for example), the crypto nif-lib might get relocated at a different address. crypto calls openssl which in turn calls the old invalid callback functions...kaboom. Solution: Break apart the callback functions into a separate dynamic lib that crypto loads with dlopen. When crypto is unloaded the callback lib is left in place to be reused if/when crypto is loaded again.