diff options
author | Richard Levitte <levitte@openssl.org> | 2017-07-01 12:14:37 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-07-03 07:51:04 +0200 |
commit | 48feaceb53fa6ae924e298b8eba0e247019313e4 (patch) | |
tree | 535524c1e9e1f24c7e0341e7721416c8e5d175eb /crypto/ui/ui_lib.c | |
parent | 6e2f49b38429d9df00ed12ade60e3de3b9ba43b3 (diff) |
Remove the possibility to disable the UI module entirely
Instead, make it possible to disable the console reader that's part of
the UI module. This makes it possible to use the UI API and other UI
methods in environments where the console reader isn't useful.
To disable the console reader, configure with 'no-ui-console' /
'disable-ui-console'.
'no-ui' / 'disable-ui' is now an alias for 'no-ui-console' /
'disable-ui-console'.
Fixes #3806
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3820)
Diffstat (limited to 'crypto/ui/ui_lib.c')
-rw-r--r-- | crypto/ui/ui_lib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index f4e01bcf38..4469a436c2 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -37,9 +37,10 @@ UI *UI_new_method(const UI_METHOD *method) } if (method == NULL) - ret->meth = UI_get_default_method(); - else - ret->meth = method; + method = UI_get_default_method(); + if (method == NULL) + method = UI_null(); + ret->meth = method; if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_UI, ret, &ret->ex_data)) { OPENSSL_free(ret); |