Fix UI method setup, which should be independent of (deprecated) engine use
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Sat, 18 Jul 2020 14:09:19 +0000 (16:09 +0200)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Wed, 22 Jul 2020 05:27:42 +0000 (07:27 +0200)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12422)

apps/cmp.c

index 87daa37dfa24a857819f7968ce95e69ac9dffd45..17b5bed6ff4ccf239b68c30c63976ab5800f2d71 100644 (file)
@@ -2924,15 +2924,13 @@ int cmp_main(int argc, char **argv)
     ret = 0;
 
     if (opt_batch) {
-#ifndef OPENSSL_NO_ENGINE
         UI_METHOD *ui_fallback_method;
-# ifndef OPENSSL_NO_UI_CONSOLE
+#ifndef OPENSSL_NO_UI_CONSOLE
         ui_fallback_method = UI_OpenSSL();
-# else
+#else
         ui_fallback_method = (UI_METHOD *)UI_null();
-# endif
-        UI_method_set_reader(ui_fallback_method, NULL);
 #endif
+        UI_method_set_reader(ui_fallback_method, NULL);
     }
 
     if (opt_engine != NULL)