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 09:53:07 +0000 (11:53 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/engine/eng_list.c

index 9e80eafdde056e8989cd11471cf8c56fc416d839..54141f3ea63f7d89fc82170ec9df6e21a7f37992 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)) {