aboutsummaryrefslogtreecommitdiff
path: root/include/openssl/engine.h
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-01-07 15:06:38 -0500
committerRich Salz <rsalz@openssl.org>2016-01-07 15:14:18 -0500
commitbbd86bf5424a611cb6b77a3a17fc522931c4dcb8 (patch)
treecc45d4fb29946c41879e563547a877a70b0c957a /include/openssl/engine.h
parent3cb8c3265f639f8eebf32053457ae6a6d61e2413 (diff)
downloadopenssl-bbd86bf5424a611cb6b77a3a17fc522931c4dcb8.zip
openssl-bbd86bf5424a611cb6b77a3a17fc522931c4dcb8.tar.gz
openssl-bbd86bf5424a611cb6b77a3a17fc522931c4dcb8.tar.bz2
mem functions cleanup
Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'include/openssl/engine.h')
-rw-r--r--include/openssl/engine.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/openssl/engine.h b/include/openssl/engine.h
index ddc7e0f..34d7fed 100644
--- a/include/openssl/engine.h
+++ b/include/openssl/engine.h
@@ -733,14 +733,6 @@ void ENGINE_add_conf_module(void);
* same static data as the calling application (or library), and thus whether
* these callbacks need to be set or not.
*/
-typedef void *(*dyn_MEM_malloc_cb) (size_t);
-typedef void *(*dyn_MEM_realloc_cb) (void *, size_t);
-typedef void (*dyn_MEM_free_cb) (void *);
-typedef struct st_dynamic_MEM_fns {
- dyn_MEM_malloc_cb malloc_cb;
- dyn_MEM_realloc_cb realloc_cb;
- dyn_MEM_free_cb free_cb;
-} dynamic_MEM_fns;
/*
* FIXME: Perhaps the memory and locking code (crypto.h) should declare and
* use these types so we (and any other dependant code) can simplify a bit??
@@ -763,7 +755,6 @@ typedef struct st_dynamic_LOCK_fns {
/* The top-level structure */
typedef struct st_dynamic_fns {
void *static_state;
- dynamic_MEM_fns mem_fns;
dynamic_LOCK_fns lock_fns;
} dynamic_fns;
@@ -812,9 +803,6 @@ typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id,
OPENSSL_EXPORT \
int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \
if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \
- if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \
- fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \
- return 0; \
CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \
CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \
CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \