/*
- * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
int ok = 0;
if (!TEST_ptr(ui_method =
- UI_UTIL_wrap_read_pem_callback( test_pem_password_cb, 0))
+ UI_UTIL_wrap_read_pem_callback(test_pem_password_cb, 0))
|| !TEST_ptr(ui = UI_new_method(ui_method)))
goto err;
/* The wrapper passes the UI userdata as the callback userdata param */
UI_add_user_data(ui, defpass);
- if (!UI_add_input_string(ui, "prompt", UI_INPUT_FLAG_DEFAULT_PWD,
- pass, 0, sizeof(pass) - 1))
+ if (UI_add_input_string(ui, "prompt", UI_INPUT_FLAG_DEFAULT_PWD,
+ pass, 0, sizeof(pass) - 1) <= 0)
goto err;
switch (UI_process(ui)) {
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;