enginetest needs 'memset' defined.
[openssl.git] / crypto / engine / enginetest.c
index 7d3e47aad1e3b02f89f6ee5008de1cef3fdbe740..f02e6f4026c07529d9ed3248d22b0cfe04016222 100644 (file)
  *
  */
 
+#include <openssl/e_os2.h>
 #include <stdio.h>
 #include <string.h>
-#include <strings.h>
+#include <openssl/buffer.h>
+#include <openssl/crypto.h>
 #include <openssl/engine.h>
 #include <openssl/err.h>
 
@@ -196,9 +198,9 @@ int main(int argc, char *argv[])
        for(loop = 0; loop < 512; loop++)
                {
                sprintf(buf, "id%i", loop);
-               id = strdup(buf);
+               id = BUF_strdup(buf);
                sprintf(buf, "Fake engine type %i", loop);
-               name = strdup(buf);
+               name = BUF_strdup(buf);
                if(((block[loop] = ENGINE_new()) == NULL) ||
                                !ENGINE_set_id(block[loop], id) ||
                                !ENGINE_set_name(block[loop], name))
@@ -233,8 +235,8 @@ cleanup_loop:
                }
        for(loop = 0; loop < 512; loop++)
                {
-               free((char *)(ENGINE_get_id(block[loop])));
-               free((char *)(ENGINE_get_name(block[loop])));
+               OPENSSL_free((void *)ENGINE_get_id(block[loop]));
+               OPENSSL_free((void *)ENGINE_get_name(block[loop]));
                }
        printf("\nTests completed happily\n");
        to_return = 0;