Add loaded dynamic ENGINEs to list.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 28 Jan 2014 13:51:58 +0000 (13:51 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 28 Jan 2014 13:57:14 +0000 (13:57 +0000)
Always add a dynamically loaded ENGINE to list. Otherwise it can cause
problems when multiply loaded, especially if it adds new public key methods.
For all current engines we only want a single implementation anyway.
(cherry picked from commit e933f91f50108a43c0198cdc63ecdfdbc77b4d0d)

crypto/engine/eng_list.c

index 27846edb1e9a4c7540ce3e6b0bfa17e8358951a3..95c858960b811b5cb910dcffbc17a3cfdda2a43f 100644 (file)
@@ -408,6 +408,7 @@ ENGINE *ENGINE_by_id(const char *id)
                                !ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) ||
                                !ENGINE_ctrl_cmd_string(iterator, "DIR_ADD",
                                        load_dir, 0) ||
+                               !ENGINE_ctrl_cmd_string(iterator, "LIST_ADD", "1", 0) ||
                                !ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0))
                                goto notfound;
                return iterator;