63 #ifdef OPENSSL_NO_ENGINE
64 int main(
int argc,
char *argv[])
66 printf(
"No ENGINE support\n");
75 static void display_engine_list(
void)
82 printf(
"listing available engine types\n");
85 printf(
"engine %i, id = \"%s\", name = \"%s\"\n",
89 printf(
"end of list\n");
95 int main(
int argc,
char *argv[])
99 const char *id, *name;
109 if (!((getenv(
"OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv(
"OPENSSL_DEBUG_MEMORY"),
"off"))))
122 memset(block, 0, 512 *
sizeof(
ENGINE *));
136 printf(
"Couldn't set up test ENGINE structures\n");
139 printf(
"\nenginetest beginning\n\n");
140 display_engine_list();
143 printf(
"Add failed!\n");
146 display_engine_list();
150 printf(
"Remove failed!\n");
155 display_engine_list();
158 printf(
"Add failed!\n");
161 display_engine_list();
164 printf(
"Remove failed!\n");
167 display_engine_list();
170 printf(
"Add failed!\n");
173 display_engine_list();
176 printf(
"Add *should* have failed but didn't!\n");
180 printf(
"Add that should fail did.\n");
184 printf(
"Remove *should* have failed but didn't!\n");
188 printf(
"Remove that should fail did.\n");
192 printf(
"Remove failed!\n");
195 display_engine_list();
198 printf(
"Remove failed!\n");
201 display_engine_list();
207 printf(
"Remove failed!i - probably no hardware "
208 "support present.\n");
211 display_engine_list();
214 printf(
"Couldn't add and remove to an empty list!\n");
218 printf(
"Successfully added and removed to an empty list!\n");
219 printf(
"About to beef up the engine-type list\n");
220 for(loop = 0; loop < 512; loop++)
222 sprintf(buf,
"id%i", loop);
224 sprintf(buf,
"Fake engine type %i", loop);
230 printf(
"Couldn't create block of ENGINE structures.\n"
231 "I'll probably also core-dump now, damn.\n");
235 for(loop = 0; loop < 512; loop++)
239 printf(
"\nAdding stopped at %i, (%s,%s)\n",
245 printf(
"."); fflush(stdout);
248 printf(
"\nAbout to empty the engine-type list\n");
253 printf(
"\nRemove failed!\n");
257 printf(
"."); fflush(stdout);
259 for(loop = 0; loop < 512; loop++)
264 printf(
"\nTests completed happily\n");
273 for(loop = 0; loop < 512; loop++)