remove ECDH_METHOD from ENGINE
[openssl.git] / crypto / engine / eng_list.c
index 54141f3ea63f7d89fc82170ec9df6e21a7f37992..997603363d71667bd5b84e3755060986510c07f0 100644 (file)
@@ -302,7 +302,6 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src)
     dest->dh_meth = src->dh_meth;
 #endif
 #ifndef OPENSSL_NO_EC
-    dest->ecdh_meth = src->ecdh_meth;
     dest->ecdsa_meth = src->ecdsa_meth;
 #endif
     dest->rand_meth = src->rand_meth;
@@ -332,7 +331,7 @@ ENGINE *ENGINE_by_id(const char *id)
     iterator = engine_list_head;
     while (iterator && (strcmp(id, iterator->id) != 0))
         iterator = iterator->next;
-    if (iterator) {
+    if (iterator != NULL) {
         /*
          * We need to return a structural reference. If this is an ENGINE
          * type that returns copies, make a duplicate - otherwise increment
@@ -340,7 +339,7 @@ ENGINE *ENGINE_by_id(const char *id)
          */
         if (iterator->flags & ENGINE_FLAGS_BY_ID_COPY) {
             ENGINE *cp = ENGINE_new();
-            if (!cp)
+            if (cp == NULL)
                 iterator = NULL;
             else {
                 engine_cpy(cp, iterator);
@@ -352,7 +351,7 @@ ENGINE *ENGINE_by_id(const char *id)
         }
     }
     CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
-    if (iterator)
+    if (iterator != NULL)
         return iterator;
     /*
      * Prevent infinite recusrion if we're looking for the dynamic engine.