From f16a64d11f55c01f56baa62ebf1dec7f8fe718cb Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Mon, 2 Feb 2015 11:40:36 -0500 Subject: [PATCH] Dead code cleanup; remove #if 0 from crypto/engine Reviewed-by: Richard Levitte --- crypto/engine/eng_all.c | 9 --------- crypto/engine/eng_list.c | 9 --------- crypto/engine/tb_store.c | 24 ------------------------ 3 files changed, 42 deletions(-) diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c index e81506c3a9..b7d2529596 100644 --- a/crypto/engine/eng_all.c +++ b/crypto/engine/eng_all.c @@ -64,15 +64,6 @@ void ENGINE_load_builtin_engines(void) { /* Some ENGINEs need this */ OPENSSL_cpuid_setup(); -#if 0 - /* - * There's no longer any need for an "openssl" ENGINE unless, one day, it - * is the *only* way for standard builtin implementations to be be - * accessed (ie. it would be possible to statically link binaries with - * *no* builtin implementations). - */ - ENGINE_load_openssl(); -#endif #if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)) ENGINE_load_cryptodev(); #endif diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index 3384e31828..c69e8a7eda 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -353,14 +353,6 @@ ENGINE *ENGINE_by_id(const char *id) } } CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); -#if 0 - if (iterator == NULL) { - ENGINEerr(ENGINE_F_ENGINE_BY_ID, ENGINE_R_NO_SUCH_ENGINE); - ERR_add_error_data(2, "id=", id); - } - return iterator; -#else - /* EEK! Experimental code starts */ if (iterator) return iterator; /* @@ -390,7 +382,6 @@ ENGINE *ENGINE_by_id(const char *id) ERR_add_error_data(2, "id=", id); return NULL; /* EEK! Experimental code ends */ -#endif } int ENGINE_up_ref(ENGINE *e) diff --git a/crypto/engine/tb_store.c b/crypto/engine/tb_store.c index 1eab49d745..84d2268879 100644 --- a/crypto/engine/tb_store.c +++ b/crypto/engine/tb_store.c @@ -91,30 +91,6 @@ void ENGINE_register_all_STORE() ENGINE_register_STORE(e); } -/* The following two functions are removed because they're useless. */ -#if 0 -int ENGINE_set_default_STORE(ENGINE *e) -{ - if (e->store_meth) - return engine_table_register(&store_table, - engine_unregister_all_STORE, e, - &dummy_nid, 1, 1); - return 1; -} -#endif - -#if 0 -/* - * Exposed API function to get a functional reference from the implementation - * table (ie. try to get a functional reference from the tabled structural - * references). - */ -ENGINE *ENGINE_get_default_STORE(void) -{ - return engine_table_select(&store_table, dummy_nid); -} -#endif - /* Obtains an STORE implementation from an ENGINE functional reference */ const STORE_METHOD *ENGINE_get_STORE(const ENGINE *e) { -- 2.40.0