Some of the ENGINE file names were changed for 8.3 filename uniqueness
[openssl.git] / crypto / engine / enginetest.c
index 6f18ebd9623272cecb31070d47db34866e85c3fc..01c3a9f5fe5b16969c8197de9fd185ed06fccafa 100644 (file)
@@ -3,7 +3,7 @@
  * project 2000.
  */
 /* ====================================================================
  * project 2000.
  */
 /* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2001 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  *
  */
 
  *
  */
 
-#include <stdio.h>
 #include <openssl/e_os2.h>
 #include <openssl/e_os2.h>
-#ifdef OPENSSL_SYS_VMS_DECC
-# define _XOPEN_SOURCE_EXTENDED
-#endif
+#include <stdio.h>
 #include <string.h>
 #include <string.h>
+#include <openssl/buffer.h>
+#include <openssl/crypto.h>
 #include <openssl/engine.h>
 #include <openssl/err.h>
 
 #include <openssl/engine.h>
 #include <openssl/err.h>
 
@@ -199,9 +198,9 @@ int main(int argc, char *argv[])
        for(loop = 0; loop < 512; loop++)
                {
                sprintf(buf, "id%i", loop);
        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);
                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))
                if(((block[loop] = ENGINE_new()) == NULL) ||
                                !ENGINE_set_id(block[loop], id) ||
                                !ENGINE_set_name(block[loop], name))
@@ -236,8 +235,8 @@ cleanup_loop:
                }
        for(loop = 0; loop < 512; 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;
                }
        printf("\nTests completed happily\n");
        to_return = 0;