diff options
author | Geoff Thorpe <geoff@openssl.org> | 2001-11-22 09:13:18 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2001-11-22 09:13:18 +0000 |
commit | e4a6cf421a57cd59ad6944151fea07af51e5e0ed (patch) | |
tree | bb69ebe5d3d9de833b672360731483d7fcc3f64c /crypto/engine/eng_dyn.c | |
parent | 329636d6e30c15f71bbf46d7f69a6ab6c3fb4726 (diff) |
When the "dynamic" ENGINE loads another ENGINE from a shared-library, it
essentially overwrites itself with the new ENGINE, with the exception of
reference counts, ex_data structures, and other 'admin' elements. However
if the new ENGINE doesn't populate certain elements, there's the risk of
the "dynamic" ENGINE's elements showing through - the "cmd_defns" were just
one of the possibilities. This implements a more comprehensive cleanup.
Diffstat (limited to 'crypto/engine/eng_dyn.c')
-rw-r--r-- | crypto/engine/eng_dyn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/engine/eng_dyn.c b/crypto/engine/eng_dyn.c index bac5e71202..9eda5a7c89 100644 --- a/crypto/engine/eng_dyn.c +++ b/crypto/engine/eng_dyn.c @@ -405,9 +405,9 @@ static int dynamic_load(ENGINE *e, dynamic_data_ctx *ctx) fns.lock_fns.dynlock_create_cb = CRYPTO_get_dynlock_create_callback(); fns.lock_fns.dynlock_lock_cb = CRYPTO_get_dynlock_lock_callback(); fns.lock_fns.dynlock_destroy_cb = CRYPTO_get_dynlock_destroy_callback(); - /* Now that we've loaded the dynamic engine, initialise the command - array to contain none */ - ENGINE_set_cmd_defns(e, dynamic_cmd_defns_empty); + /* Now that we've loaded the dynamic engine, make sure no "dynamic" + * ENGINE elements will show through. */ + engine_set_all_null(e); /* Try to bind the ENGINE onto our own ENGINE structure */ if(!ctx->bind_engine(e, ctx->engine_id, &fns)) |