Dead code cleanup; remove #if 0 from crypto/engine
authorRich Salz <rsalz@openssl.org>
Mon, 2 Feb 2015 16:40:36 +0000 (11:40 -0500)
committerRich Salz <rsalz@openssl.org>
Mon, 2 Feb 2015 16:40:36 +0000 (11:40 -0500)
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/engine/eng_all.c
crypto/engine/eng_list.c
crypto/engine/tb_store.c

index e81506c3a981b798192918d16760b55d7dde8049..b7d2529596dd4bd69b2b5c8d47e0c4ad6babeefa 100644 (file)
@@ -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
index 3384e3182893369d9134b29224861a7e25f02216..c69e8a7eda5a5c7790689d65e527b63391579c9d 100644 (file)
@@ -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)
index 1eab49d7458e5ecb737492b03deee0a241d8be95..84d2268879ea89453eba7f8e7778583c4452897b 100644 (file)
@@ -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)
 {