76 static ENGINE *engine_list_head = NULL;
77 static ENGINE *engine_list_tail = NULL;
82 static void engine_list_cleanup(
void)
84 ENGINE *iterator = engine_list_head;
86 while(iterator != NULL)
89 iterator = engine_list_head;
96 static int engine_list_add(
ENGINE *
e)
107 iterator = engine_list_head;
108 while(iterator && !conflict)
110 conflict = (strcmp(iterator->
id, e->
id) == 0);
111 iterator = iterator->
next;
119 if(engine_list_head == NULL)
128 engine_list_head =
e;
137 if((engine_list_tail == NULL) ||
138 (engine_list_tail->
next != NULL))
144 engine_list_tail->
next =
e;
145 e->
prev = engine_list_tail;
152 engine_list_tail = e;
157 static
int engine_list_remove(
ENGINE *e)
168 iterator = engine_list_head;
169 while(iterator && (iterator != e))
170 iterator = iterator->
next;
179 e->next->prev = e->prev;
181 e->prev->next = e->next;
183 if(engine_list_head == e)
184 engine_list_head = e->
next;
185 if(engine_list_tail == e)
186 engine_list_tail = e->
prev;
197 ret = engine_list_head;
212 ret = engine_list_tail;
279 if((e->
id == NULL) || (e->
name == NULL))
285 if(!engine_list_add(e))
306 if(!engine_list_remove(e))
320 #ifndef OPENSSL_NO_RSA
323 #ifndef OPENSSL_NO_DSA
326 #ifndef OPENSSL_NO_DH
329 #ifndef OPENSSL_NO_ECDH
332 #ifndef OPENSSL_NO_ECDSA
353 char *load_dir = NULL;
361 iterator = engine_list_head;
362 while(iterator && (strcmp(
id, iterator->
id) != 0))
363 iterator = iterator->
next;
376 engine_cpy(cp, iterator);
397 if(iterator)
return iterator;
399 if (strcmp(
id,
"dynamic"))
401 #ifdef OPENSSL_SYS_VMS
402 if((load_dir = getenv(
"OPENSSL_ENGINES")) == 0) load_dir =
"SSLROOT:[ENGINES]";
404 if((load_dir = getenv(
"OPENSSL_ENGINES")) == 0) load_dir = ENGINESDIR;