diff options
author | Brent Cook <bcook@cvs.openbsd.org> | 2015-06-19 07:18:59 +0000 |
---|---|---|
committer | Brent Cook <bcook@cvs.openbsd.org> | 2015-06-19 07:18:59 +0000 |
commit | 5eaaaad177ae4247fab63fbe5da757c76e1f03a1 (patch) | |
tree | 285e6608309f02321cd8b0022e625add320423d3 /usr.bin/openssl/apps.c | |
parent | 2085708d3553ebb45bac6dc9ef08e88f32519178 (diff) |
Remove fallback dynamic engine loading support.
Since we no longer have dynamic engines, don't bother falling back to them
if a builtin engine is not found first.
Before:
$ openssl dgst -engine unknown
invalid engine "unknown"
27256010481532:error:2606A074:engine routines:ENGINE_by_id:no such
engine:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/engine/eng_list.c:384:id=unknown
27256010481532:error:2606A074:engine routines:ENGINE_by_id:no such
engine:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/engine/eng_list.c:384:id=dynamic
After:
$ openssl dgst -engine unknown
invalid engine "unknown"
27256010481532:error:2606A074:engine routines:ENGINE_by_id:no such
engine:/usr/src/lib/libcrypto/crypto/../../libssl/src/crypto/engine/eng_list.c:384:id=unknown
ok doug@
Diffstat (limited to 'usr.bin/openssl/apps.c')
-rw-r--r-- | usr.bin/openssl/apps.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/usr.bin/openssl/apps.c b/usr.bin/openssl/apps.c index 54a3fee3446..2b2c0a9c1c5 100644 --- a/usr.bin/openssl/apps.c +++ b/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.26 2015/06/16 02:27:24 doug Exp $ */ +/* $OpenBSD: apps.c,v 1.27 2015/06/19 07:18:58 bcook Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -1251,21 +1251,6 @@ end: } #ifndef OPENSSL_NO_ENGINE -/* Try to load an engine in a shareable library */ -static ENGINE * -try_load_engine(BIO *err, const char *engine, int debug) -{ - ENGINE *e = ENGINE_by_id("dynamic"); - - if (e) { - if (!ENGINE_ctrl_cmd_string(e, "SO_PATH", engine, 0) || - !ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0)) { - ENGINE_free(e); - e = NULL; - } - } - return e; -} ENGINE * setup_engine(BIO *err, const char *engine, int debug) @@ -1278,8 +1263,7 @@ setup_engine(BIO *err, const char *engine, int debug) ENGINE_register_all_complete(); return NULL; } - if ((e = ENGINE_by_id(engine)) == NULL && - (e = try_load_engine(err, engine, debug)) == NULL) { + if ((e = ENGINE_by_id(engine)) == NULL) { BIO_printf(err, "invalid engine \"%s\"\n", engine); ERR_print_errors(err); return NULL; |