提交 591ceedd 编写于 作者: D Dr. David von Oheimb

apps_ui.c: Correct handling of empty password from -passin

This is done in analogy to commit ca3245a6Reviewed-by: NTomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12493)
上级 f84de16f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册