From: Dr. David von Oheimb Date: Mon, 11 May 2020 13:32:26 +0000 (+0200) Subject: apps_ui.c: Correct handling of empty password from -passin X-Git-Tag: openssl-3.0.0-alpha7~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=591ceeddb349d735480102f1992c868663b2c580;p=thirdparty%2Fopenssl.git apps_ui.c: Correct handling of empty password from -passin This is done in analogy to commit ca3245a61989009a99931748723d12e30d0a66b2 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/12493) --- diff --git a/apps/lib/apps_ui.c b/apps/lib/apps_ui.c index 8523cda3c22..dd794ec747e 100644 --- a/apps/lib/apps_ui.c +++ b/apps/lib/apps_ui.c @@ -15,7 +15,6 @@ static UI_METHOD *ui_method = NULL; static const UI_METHOD *ui_fallback_method = NULL; - static int ui_open(UI *ui) { int (*opener)(UI *ui) = UI_method_get_opener(ui_fallback_method); @@ -72,7 +71,8 @@ static int ui_write(UI *ui, UI_STRING *uis) { const char *password = ((PW_CB_DATA *)UI_get0_user_data(ui))->password; - if (password && password[0] != '\0') + + if (password != NULL) return 1; } break;