diff options
| author | bcook <> | 2015-06-19 07:18:58 +0000 |
|---|---|---|
| committer | bcook <> | 2015-06-19 07:18:58 +0000 |
| commit | 9ff3daa12bfb94dd51bda4cccbd6f620971e8682 (patch) | |
| tree | 5c9c12999c80ca38506862592fb8d4c029e5ef49 /src | |
| parent | 433691f86112f1eea8eb1872e9c9b8b423437151 (diff) | |
| download | openbsd-9ff3daa12bfb94dd51bda4cccbd6f620971e8682.tar.gz openbsd-9ff3daa12bfb94dd51bda4cccbd6f620971e8682.tar.bz2 openbsd-9ff3daa12bfb94dd51bda4cccbd6f620971e8682.zip | |
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 '')
| -rw-r--r-- | src/usr.bin/openssl/apps.c | 20 |
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 */ | ||
| 1255 | static ENGINE * | ||
| 1256 | try_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 | ||
| 1270 | ENGINE * | 1255 | ENGINE * |
| 1271 | setup_engine(BIO *err, const char *engine, int debug) | 1256 | setup_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; |
