When ENGINE_add finds that id or name is missing, actually return
authorRichard Levitte <levitte@openssl.org>
Thu, 8 Oct 2015 09:53:07 +0000 (11:53 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 8 Oct 2015 10:41:06 +0000 (12:41 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 5850cc75ea0c1581a9034390f1ca77cadc596238)

crypto/engine/eng_list.c

index 3384e3182893369d9134b29224861a7e25f02216..83c95d56f4660f0bda52baa589da104fa8480a96 100644 (file)
@@ -260,6 +260,7 @@ int ENGINE_add(ENGINE *e)
     }
     if ((e->id == NULL) || (e->name == NULL)) {
         ENGINEerr(ENGINE_F_ENGINE_ADD, ENGINE_R_ID_OR_NAME_MISSING);
+        return 0;
     }
     CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
     if (!engine_list_add(e)) {