void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb) { ENGINE_CLEANUP_ITEM *item; if(!int_cleanup_check(1)) return; item = int_cleanup_item(cb); if(item) sk_ENGINE_CLEANUP_ITEM_push(cleanup_stack, item); }
void engine_cleanup_int(void) { if (int_cleanup_check(0)) { sk_ENGINE_CLEANUP_ITEM_pop_free(cleanup_stack, engine_cleanup_cb_free); cleanup_stack = NULL; } CRYPTO_THREAD_lock_free(global_engine_lock); }
void ENGINE_cleanup(void) { if(int_cleanup_check(0)) { sk_ENGINE_CLEANUP_ITEM_pop_free(cleanup_stack, engine_cleanup_cb_free); cleanup_stack = NULL; } /* FIXME: This should be handled (somehow) through RAND, eg. by it * registering a cleanup callback. */ RAND_set_rand_method(NULL); }