Avoid warnings: add missing prototype, don't shadow.
[openssl.git] / engines / e_nuron.c
index 130b6d8b40571e40bdd034d80dc4d16e3974392a..e3a9406c4976f3bf914b6eb4ec559bc202811206 100644 (file)
@@ -57,8 +57,9 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <openssl/crypto.h>
-#include "cryptlib.h"
+#include <openssl/buffer.h>
 #include <openssl/dso.h>
 #include <openssl/engine.h>
 
@@ -67,7 +68,7 @@
 #ifndef OPENSSL_NO_HW_NURON
 
 #define NURON_LIB_NAME "nuron engine"
-#include "hw_nuron_err.c"
+#include "e_nuron_err.c"
 
 static const char *NURON_LIBNAME = NULL;
 static const char *get_NURON_LIBNAME(void)
@@ -155,7 +156,7 @@ static int nuron_finish(ENGINE *e)
        return 1;
        }
 
-static int nuron_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
+static int nuron_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
        {
        int initialised = ((pvDSOHandle == NULL) ? 0 : 1);
        switch(cmd)
@@ -269,6 +270,7 @@ static RSA_METHOD nuron_rsa =
        0,
        NULL,
        NULL,
+       NULL,
        NULL
        };
 #endif
@@ -285,7 +287,9 @@ static DSA_METHOD nuron_dsa =
        NULL, /* init */
        NULL, /* finish */
        0, /* flags */
-       NULL /* app_data */
+       NULL, /* app_data */
+       NULL, /* dsa_paramgen */
+       NULL /* dsa_keygen */
        };
 #endif
 
@@ -299,6 +303,7 @@ static DH_METHOD nuron_dh =
        NULL,
        NULL,
        0,
+       NULL,
        NULL
        };
 #endif
@@ -374,6 +379,7 @@ static int bind_helper(ENGINE *e)
        return 1;
        }
 
+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
 static ENGINE *engine_nuron(void)
        {
        ENGINE *ret = ENGINE_new();
@@ -396,10 +402,11 @@ void ENGINE_load_nuron(void)
        ENGINE_free(toadd);
        ERR_clear_error();
        }
+#endif
 
 /* This stuff is needed if this ENGINE is being compiled into a self-contained
  * shared-library. */     
-#ifdef ENGINE_DYNAMIC_SUPPORT
+#ifndef OPENSSL_NO_DYNAMIC_ENGINE
 static int bind_fn(ENGINE *e, const char *id)
        {
        if(id && (strcmp(id, engine_nuron_id) != 0))
@@ -410,7 +417,7 @@ static int bind_fn(ENGINE *e, const char *id)
        }       
 IMPLEMENT_DYNAMIC_CHECK_FN()
 IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
-#endif /* ENGINE_DYNAMIC_SUPPORT */
+#endif /* OPENSSL_NO_DYNAMIC_ENGINE */
 
 #endif /* !OPENSSL_NO_HW_NURON */
 #endif /* !OPENSSL_NO_HW */