# include <openssl/safestack.h>
# include <openssl/pem.h>
# include <openssl/ossl_typ.h>
+# include <openssl/uierr.h>
#ifdef __cplusplus
extern "C" {
* methods may not, however.
*/
void *UI_add_user_data(UI *ui, void *user_data);
+/*
+ * Alternatively, this function is used to duplicate the user data.
+ * This uses the duplicator method function. The destroy function will
+ * be used to free the user data in this case.
+ */
+int UI_dup_user_data(UI *ui, void *user_data);
/* We need a user data retrieving function as well. */
void *UI_get0_user_data(UI *ui);
int UI_method_set_reader(UI_METHOD *method,
int (*reader) (UI *ui, UI_STRING *uis));
int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));
+int UI_method_set_data_duplicator(UI_METHOD *method,
+ void *(*duplicator) (UI *ui, void *ui_data),
+ void (*destructor)(UI *ui, void *ui_data));
int UI_method_set_prompt_constructor(UI_METHOD *method,
char *(*prompt_constructor) (UI *ui,
const char
int (*UI_method_get_closer(const UI_METHOD *method)) (UI *);
char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))
(UI *, const char *, const char *);
+void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *);
+void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *);
const void *UI_method_get_ex_data(const UI_METHOD *method, int idx);
/*
int verify);
int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
int verify);
- UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
-
-/* BEGIN ERROR CODES */
-/*
- * The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
+UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
int ERR_load_UI_strings(void);
-/* Error codes for the UI functions. */
-
-/* Function codes. */
-# define UI_F_CLOSE_CONSOLE 115
-# define UI_F_ECHO_CONSOLE 116
-# define UI_F_GENERAL_ALLOCATE_BOOLEAN 108
-# define UI_F_GENERAL_ALLOCATE_PROMPT 109
-# define UI_F_NOECHO_CONSOLE 117
-# define UI_F_OPEN_CONSOLE 114
-# define UI_F_UI_CREATE_METHOD 112
-# define UI_F_UI_CTRL 111
-# define UI_F_UI_DUP_ERROR_STRING 101
-# define UI_F_UI_DUP_INFO_STRING 102
-# define UI_F_UI_DUP_INPUT_BOOLEAN 110
-# define UI_F_UI_DUP_INPUT_STRING 103
-# define UI_F_UI_DUP_VERIFY_STRING 106
-# define UI_F_UI_GET0_RESULT 107
-# define UI_F_UI_NEW_METHOD 104
-# define UI_F_UI_PROCESS 113
-# define UI_F_UI_SET_RESULT 105
-
-/* Reason codes. */
-# define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104
-# define UI_R_INDEX_TOO_LARGE 102
-# define UI_R_INDEX_TOO_SMALL 103
-# define UI_R_NO_RESULT_BUFFER 105
-# define UI_R_PROCESSING_ERROR 107
-# define UI_R_RESULT_TOO_LARGE 100
-# define UI_R_RESULT_TOO_SMALL 101
-# define UI_R_SYSASSIGN_ERROR 109
-# define UI_R_SYSDASSGN_ERROR 110
-# define UI_R_SYSQIOW_ERROR 111
-# define UI_R_UNKNOWN_CONTROL_COMMAND 106
-# define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108
-
# ifdef __cplusplus
}
# endif