63 # ifndef OPENSSL_NO_DEPRECATED
64 # include <openssl/crypto.h>
66 # include <openssl/safestack.h>
67 # include <openssl/ossl_typ.h>
86 UI *UI_new_method(
const UI_METHOD *method);
132 int UI_add_input_string(UI *ui,
const char *prompt,
int flags,
133 char *result_buf,
int minsize,
int maxsize);
134 int UI_dup_input_string(UI *ui,
const char *prompt,
int flags,
135 char *result_buf,
int minsize,
int maxsize);
136 int UI_add_verify_string(UI *ui,
const char *prompt,
int flags,
137 char *result_buf,
int minsize,
int maxsize,
138 const char *test_buf);
139 int UI_dup_verify_string(UI *ui,
const char *prompt,
int flags,
140 char *result_buf,
int minsize,
int maxsize,
141 const char *test_buf);
142 int UI_add_input_boolean(UI *ui,
const char *prompt,
const char *action_desc,
143 const char *ok_chars,
const char *cancel_chars,
144 int flags,
char *result_buf);
145 int UI_dup_input_boolean(UI *ui,
const char *prompt,
const char *action_desc,
146 const char *ok_chars,
const char *cancel_chars,
147 int flags,
char *result_buf);
148 int UI_add_info_string(UI *ui,
const char *text);
149 int UI_dup_info_string(UI *ui,
const char *text);
150 int UI_add_error_string(UI *ui,
const char *text);
151 int UI_dup_error_string(UI *ui,
const char *text);
155 # define UI_INPUT_FLAG_ECHO 0x01
163 # define UI_INPUT_FLAG_DEFAULT_PWD 0x02
175 # define UI_INPUT_FLAG_USER_BASE 16
195 char *UI_construct_prompt(UI *ui_method,
196 const char *object_desc,
const char *object_name);
209 void *UI_add_user_data(UI *ui,
void *user_data);
211 void *UI_get0_user_data(UI *ui);
214 const char *UI_get0_result(UI *ui,
int i);
217 int UI_process(UI *ui);
224 int UI_ctrl(UI *ui,
int cmd,
long i,
void *p,
void (*f) (
void));
232 # define UI_CTRL_PRINT_ERRORS 1
238 # define UI_CTRL_IS_REDOABLE 2
241 # define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg)
242 # define UI_get_app_data(s) UI_get_ex_data(s,0)
243 int UI_get_ex_new_index(
long argl,
void *argp, CRYPTO_EX_new *new_func,
244 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
245 int UI_set_ex_data(UI *r,
int idx,
void *arg);
246 void *UI_get_ex_data(UI *r,
int idx);
249 void UI_set_default_method(
const UI_METHOD *meth);
250 const UI_METHOD *UI_get_default_method(
void);
251 const UI_METHOD *UI_get_method(UI *ui);
252 const UI_METHOD *UI_set_method(UI *ui,
const UI_METHOD *meth);
255 UI_METHOD *UI_OpenSSL(
void);
304 typedef struct ui_string_st UI_STRING;
305 DECLARE_STACK_OF(UI_STRING)
311 enum UI_string_types {
321 UI_METHOD *UI_create_method(
char *name);
322 void UI_destroy_method(UI_METHOD *ui_method);
323 int UI_method_set_opener(UI_METHOD *method,
int (*opener) (UI *ui));
324 int UI_method_set_writer(UI_METHOD *method,
325 int (*writer) (UI *ui, UI_STRING *uis));
326 int UI_method_set_flusher(UI_METHOD *method,
int (*flusher) (UI *ui));
327 int UI_method_set_reader(UI_METHOD *method,
328 int (*reader) (UI *ui, UI_STRING *uis));
329 int UI_method_set_closer(UI_METHOD *method,
int (*closer) (UI *ui));
330 int UI_method_set_prompt_constructor(UI_METHOD *method,
331 char *(*prompt_constructor) (UI *ui,
336 int (*UI_method_get_opener(UI_METHOD *method)) (UI *);
337 int (*UI_method_get_writer(UI_METHOD *method)) (UI *, UI_STRING *);
338 int (*UI_method_get_flusher(UI_METHOD *method)) (UI *);
339 int (*UI_method_get_reader(UI_METHOD *method)) (UI *, UI_STRING *);
340 int (*UI_method_get_closer(UI_METHOD *method)) (UI *);
341 char *(*UI_method_get_prompt_constructor(UI_METHOD *method)) (UI *,
351 enum UI_string_types UI_get_string_type(UI_STRING *uis);
353 int UI_get_input_flags(UI_STRING *uis);
355 const char *UI_get0_output_string(UI_STRING *uis);
360 const char *UI_get0_action_string(UI_STRING *uis);
362 const char *UI_get0_result_string(UI_STRING *uis);
366 const char *UI_get0_test_string(UI_STRING *uis);
368 int UI_get_result_minsize(UI_STRING *uis);
370 int UI_get_result_maxsize(UI_STRING *uis);
372 int UI_set_result(UI *ui, UI_STRING *uis,
const char *result);
375 int UI_UTIL_read_pw_string(
char *buf,
int length,
const char *prompt,
377 int UI_UTIL_read_pw(
char *buf,
char *buff,
int size,
const char *prompt,
385 void ERR_load_UI_strings(
void);
390 # define UI_F_GENERAL_ALLOCATE_BOOLEAN 108
391 # define UI_F_GENERAL_ALLOCATE_PROMPT 109
392 # define UI_F_GENERAL_ALLOCATE_STRING 100
393 # define UI_F_UI_CTRL 111
394 # define UI_F_UI_DUP_ERROR_STRING 101
395 # define UI_F_UI_DUP_INFO_STRING 102
396 # define UI_F_UI_DUP_INPUT_BOOLEAN 110
397 # define UI_F_UI_DUP_INPUT_STRING 103
398 # define UI_F_UI_DUP_VERIFY_STRING 106
399 # define UI_F_UI_GET0_RESULT 107
400 # define UI_F_UI_NEW_METHOD 104
401 # define UI_F_UI_SET_RESULT 105
404 # define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104
405 # define UI_R_INDEX_TOO_LARGE 102
406 # define UI_R_INDEX_TOO_SMALL 103
407 # define UI_R_NO_RESULT_BUFFER 105
408 # define UI_R_RESULT_TOO_LARGE 100
409 # define UI_R_RESULT_TOO_SMALL 101
410 # define UI_R_UNKNOWN_CONTROL_COMMAND 106