summaryrefslogtreecommitdiffstats
path: root/apps/pkcs8.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-07-01 12:14:37 +0200
committerRichard Levitte <levitte@openssl.org>2017-07-03 07:51:04 +0200
commit48feaceb53fa6ae924e298b8eba0e247019313e4 (patch)
tree535524c1e9e1f24c7e0341e7721416c8e5d175eb /apps/pkcs8.c
parent6e2f49b38429d9df00ed12ade60e3de3b9ba43b3 (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 'apps/pkcs8.c')
-rw-r--r--apps/pkcs8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
index e964a3b619..ad41f7b711 100644
--- a/apps/pkcs8.c
+++ b/apps/pkcs8.c
@@ -65,7 +65,7 @@ int pkcs8_main(int argc, char **argv)
const EVP_CIPHER *cipher = NULL;
char *infile = NULL, *outfile = NULL;
char *passinarg = NULL, *passoutarg = NULL, *prog;
-#ifndef OPENSSL_NO_UI
+#ifndef OPENSSL_NO_UI_CONSOLE
char pass[APP_PASS_LEN];
#endif
char *passin = NULL, *passout = NULL, *p8pass = NULL;
@@ -236,7 +236,7 @@ int pkcs8_main(int argc, char **argv)
p8pass = passout;
} else if (1) {
/* To avoid bit rot */
-#ifndef OPENSSL_NO_UI
+#ifndef OPENSSL_NO_UI_CONSOLE
p8pass = pass;
if (EVP_read_pw_string
(pass, sizeof pass, "Enter Encryption Password:", 1)) {
@@ -299,7 +299,7 @@ int pkcs8_main(int argc, char **argv)
if (passin != NULL) {
p8pass = passin;
} else if (1) {
-#ifndef OPENSSL_NO_UI
+#ifndef OPENSSL_NO_UI_CONSOLE
p8pass = pass;
if (EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0)) {
BIO_printf(bio_err, "Can't read Password\n");