Reduce header interdependencies, initially in engine.h (the rest of the
[openssl.git] / engines / e_sureware.c
index 9c2279c1957df28f0452cbcf767ca30b4297fa8b..654f41031abc3c75a475b4c4236bae1696960bff 100644 (file)
@@ -56,6 +56,7 @@
 #include <openssl/pem.h>
 #include <openssl/dso.h>
 #include <openssl/engine.h>
+#include <openssl/rand.h>
 
 #ifndef OPENSSL_NO_HW
 #ifndef OPENSSL_NO_HW_SUREWARE
@@ -69,7 +70,7 @@
 #define SUREWARE_LIB_NAME "sureware engine"
 #include "e_sureware_err.c"
 
-static int surewarehk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)());
+static int surewarehk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
 static int surewarehk_destroy(ENGINE *e);
 static int surewarehk_init(ENGINE *e);
 static int surewarehk_finish(ENGINE *e);
@@ -122,7 +123,8 @@ static RSA_METHOD surewarehk_rsa =
        0,      /* RSA flag*/
        NULL, 
        NULL, /* OpenSSL sign*/
-       NULL  /* OpenSSL verify*/
+       NULL, /* OpenSSL verify*/
+       NULL  /* keygen */
        };
 #endif
 
@@ -144,7 +146,8 @@ static DH_METHOD surewarehk_dh =
        NULL, /* init*/
        NULL, /* finish*/
        0,    /* flags*/
-       NULL 
+       NULL,
+       NULL
        };
 #endif
 
@@ -193,6 +196,8 @@ static DSA_METHOD surewarehk_dsa =
        NULL,/*finish*/
        0,
        NULL,
+       NULL,
+       NULL
        };
 #endif
 
@@ -364,7 +369,7 @@ static BIO *logstream = NULL;
  * called, the checking and error handling is probably down there. 
 */
 static int threadsafe=1;
-static int surewarehk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
+static int surewarehk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
 {
        int to_return = 1;
 
@@ -906,7 +911,7 @@ static int surewarehk_rsa_priv_dec(int flen,const unsigned char *from,unsigned c
 err:
        if (buf)
        {
-               memset(buf,0,tlen);
+               OPENSSL_cleanse(buf,tlen);
                OPENSSL_free(buf);
        }
        return ret;