From 48feaceb53fa6ae924e298b8eba0e247019313e4 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 1 Jul 2017 12:14:37 +0200 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/3820) --- crypto/ui/ui_lib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crypto/ui/ui_lib.c') 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); -- cgit v1.2.3