diff --git a/apps/lib/apps_ui.c b/apps/lib/apps_ui.c index 13f8670d9fadc4ce5ba0a1322887f258259e94d9..8523cda3c22d43a81ef55d207399b846a6192c33 100644 --- a/apps/lib/apps_ui.c +++ b/apps/lib/apps_ui.c @@ -106,11 +106,13 @@ int setup_ui_method(void) ui_fallback_method = UI_OpenSSL(); #endif ui_method = UI_create_method("OpenSSL application user interface"); - UI_method_set_opener(ui_method, ui_open); - UI_method_set_reader(ui_method, ui_read); - UI_method_set_writer(ui_method, ui_write); - UI_method_set_closer(ui_method, ui_close); - return 0; + return ui_method != NULL + && 0 == UI_method_set_opener(ui_method, ui_open) + && 0 == UI_method_set_reader(ui_method, ui_read) + && 0 == UI_method_set_writer(ui_method, ui_write) + && 0 == UI_method_set_closer(ui_method, ui_close) + && 0 == UI_method_set_prompt_constructor(ui_method, + ui_prompt_construct); } void destroy_ui_method(void) diff --git a/apps/openssl.c b/apps/openssl.c index 6b2c2b9c6ba7512ce8979e1b2c5e14783da9556f..b426f594b3c625b929f70e99eabac5fca97759f4 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -68,7 +68,7 @@ static int apps_startup(void) | OPENSSL_INIT_LOAD_CONFIG, NULL)) return 0; - setup_ui_method(); + (void)setup_ui_method(); /* * NOTE: This is an undocumented feature required for testing only. diff --git a/test/uitest.c b/test/uitest.c index 289f32b6b05f50fc838e703d35a77df2bc497683..d45d57d9fb872d4528fb1e5559d6c617676872bd 100644 --- a/test/uitest.c +++ b/test/uitest.c @@ -78,7 +78,7 @@ static int test_new_ui(void) char pass[16]; int ok = 0; - setup_ui_method(); + (void)setup_ui_method(); if (TEST_int_gt(password_callback(pass, sizeof(pass), 0, &cb_data), 0) && TEST_str_eq(pass, cb_data.password)) ok = 1;