summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/eng_list.c
diff options
context:
space:
mode:
authorbcook <>2015-06-19 06:05:11 +0000
committerbcook <>2015-06-19 06:05:11 +0000
commit3293ee7f21e12c11500db87f81e518c9dada1317 (patch)
tree538e72acb11427108f44223401736d2fbf8567b3 /src/lib/libcrypto/engine/eng_list.c
parent1e5789c97a8071094172fd10fb49618ac87026ef (diff)
downloadopenbsd-3293ee7f21e12c11500db87f81e518c9dada1317.tar.gz
openbsd-3293ee7f21e12c11500db87f81e518c9dada1317.tar.bz2
openbsd-3293ee7f21e12c11500db87f81e518c9dada1317.zip
Disable ENGINE_load_dynamic (dynamic engine support).
We do not build, test or ship any dynamic engines, so we can remove the dynamic engine loader as well. This leaves a stub initialization function in its place. ok beck@, reyk@, miod@
Diffstat (limited to 'src/lib/libcrypto/engine/eng_list.c')
-rw-r--r--src/lib/libcrypto/engine/eng_list.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c
index 939cc82b17..7f3cb35515 100644
--- a/src/lib/libcrypto/engine/eng_list.c
+++ b/src/lib/libcrypto/engine/eng_list.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_list.c,v 1.18 2015/04/11 16:03:21 deraadt Exp $ */ 1/* $OpenBSD: eng_list.c,v 1.19 2015/06/19 06:05:11 bcook Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -351,7 +351,6 @@ ENGINE *
351ENGINE_by_id(const char *id) 351ENGINE_by_id(const char *id)
352{ 352{
353 ENGINE *iterator; 353 ENGINE *iterator;
354 char *load_dir = NULL;
355 354
356 if (id == NULL) { 355 if (id == NULL) {
357 ENGINEerr(ENGINE_F_ENGINE_BY_ID, 356 ENGINEerr(ENGINE_F_ENGINE_BY_ID,
@@ -381,30 +380,9 @@ ENGINE_by_id(const char *id)
381 } 380 }
382 CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); 381 CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
383 382
384 /* EEK! Experimental code starts */ 383 if (iterator == NULL)
385 if (iterator) 384 ENGINEerr(ENGINE_F_ENGINE_BY_ID, ENGINE_R_NO_SUCH_ENGINE);
386 return iterator; 385 return iterator;
387 /* Prevent infinite recusrion if we're looking for the dynamic engine. */
388 if (strcmp(id, "dynamic")) {
389 load_dir = ENGINESDIR;
390
391 iterator = ENGINE_by_id("dynamic");
392 if (!iterator ||
393 !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) ||
394 !ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) ||
395 !ENGINE_ctrl_cmd_string(iterator, "DIR_ADD", load_dir, 0) ||
396 !ENGINE_ctrl_cmd_string(iterator, "LIST_ADD", "1", 0) ||
397 !ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0))
398 goto notfound;
399 return iterator;
400 }
401
402notfound:
403 ENGINE_free(iterator);
404 ENGINEerr(ENGINE_F_ENGINE_BY_ID, ENGINE_R_NO_SUCH_ENGINE);
405 ERR_asprintf_error_data("id=%s", id);
406 return NULL;
407 /* EEK! Experimental code ends */
408} 386}
409 387
410int 388int