Typo: should check mgf1md
[oweals/openssl.git] / crypto / engine / eng_lib.c
index 8a21f38028d1b37ac86bac86ebd2316e53b070f9..6f422bd77e8a3675a780a3bb78aab36910c8c862 100644 (file)
@@ -67,7 +67,7 @@ void engine_set_all_null(ENGINE *e)
     e->flags = 0;
 }
 
-int engine_free_util(ENGINE *e, int locked)
+int engine_free_util(ENGINE *e, int not_locked)
 {
     int i;
 
@@ -76,7 +76,7 @@ int engine_free_util(ENGINE *e, int locked)
 #ifdef HAVE_ATOMICS
     CRYPTO_DOWN_REF(&e->struct_ref, &i, global_engine_lock);
 #else
-    if (locked)
+    if (not_locked)
         CRYPTO_atomic_add(&e->struct_ref, -1, &i, global_engine_lock);
     else
         i = --e->struct_ref;
@@ -166,11 +166,6 @@ void engine_cleanup_int(void)
                                         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);
     CRYPTO_THREAD_lock_free(global_engine_lock);
 }