summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/openssl')
-rw-r--r--src/usr.bin/openssl/apps.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c
index 54a3fee344..2b2c0a9c1c 100644
--- a/src/usr.bin/openssl/apps.c
+++ b/src/usr.bin/openssl/apps.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: apps.c,v 1.26 2015/06/16 02:27:24 doug Exp $ */ 1/* $OpenBSD: apps.c,v 1.27 2015/06/19 07:18:58 bcook Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -1251,21 +1251,6 @@ end:
1251} 1251}
1252 1252
1253#ifndef OPENSSL_NO_ENGINE 1253#ifndef OPENSSL_NO_ENGINE
1254/* Try to load an engine in a shareable library */
1255static ENGINE *
1256try_load_engine(BIO *err, const char *engine, int debug)
1257{
1258 ENGINE *e = ENGINE_by_id("dynamic");
1259
1260 if (e) {
1261 if (!ENGINE_ctrl_cmd_string(e, "SO_PATH", engine, 0) ||
1262 !ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0)) {
1263 ENGINE_free(e);
1264 e = NULL;
1265 }
1266 }
1267 return e;
1268}
1269 1254
1270ENGINE * 1255ENGINE *
1271setup_engine(BIO *err, const char *engine, int debug) 1256setup_engine(BIO *err, const char *engine, int debug)
@@ -1278,8 +1263,7 @@ setup_engine(BIO *err, const char *engine, int debug)
1278 ENGINE_register_all_complete(); 1263 ENGINE_register_all_complete();
1279 return NULL; 1264 return NULL;
1280 } 1265 }
1281 if ((e = ENGINE_by_id(engine)) == NULL && 1266 if ((e = ENGINE_by_id(engine)) == NULL) {
1282 (e = try_load_engine(err, engine, debug)) == NULL) {
1283 BIO_printf(err, "invalid engine \"%s\"\n", engine); 1267 BIO_printf(err, "invalid engine \"%s\"\n", engine);
1284 ERR_print_errors(err); 1268 ERR_print_errors(err);
1285 return NULL; 1269 return NULL;