summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ui/ui_lib.c
diff options
context:
space:
mode:
authortb <>2026-05-19 09:17:44 +0000
committertb <>2026-05-19 09:17:44 +0000
commit1bd3db3b28b123d1adeffcb69b8d4020de53bb57 (patch)
treecfb73fe55addd2ad568099e561a35ef10412387a /src/lib/libcrypto/ui/ui_lib.c
parent8bb94b7a3d27460eb52d28debd9344cbb83a1108 (diff)
downloadopenbsd-1bd3db3b28b123d1adeffcb69b8d4020de53bb57.tar.gz
openbsd-1bd3db3b28b123d1adeffcb69b8d4020de53bb57.tar.bz2
openbsd-1bd3db3b28b123d1adeffcb69b8d4020de53bb57.zip
libcrypto/ui: move ui_string_st to ui_lib.c. It's only used there.
Diffstat (limited to 'src/lib/libcrypto/ui/ui_lib.c')
-rw-r--r--src/lib/libcrypto/ui/ui_lib.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c
index cc9de59c19..e7587beea1 100644
--- a/src/lib/libcrypto/ui/ui_lib.c
+++ b/src/lib/libcrypto/ui/ui_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui_lib.c,v 1.52 2025/05/10 05:54:39 tb Exp $ */ 1/* $OpenBSD: ui_lib.c,v 1.53 2026/05/19 09:17:44 tb Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -68,6 +68,39 @@
68 68
69static const UI_METHOD *default_UI_meth = NULL; 69static const UI_METHOD *default_UI_meth = NULL;
70 70
71struct ui_string_st {
72 enum UI_string_types type; /* Input */
73 const char *out_string; /* Input */
74 int input_flags; /* Flags from the user */
75
76 /* The following parameters are completely irrelevant for UIT_INFO,
77 and can therefore be set to 0 or NULL */
78 char *result_buf; /* Input and Output: If not NULL, user-defined
79 with size in result_maxsize. Otherwise, it
80 may be allocated by the UI routine, meaning
81 result_minsize is going to be overwritten.*/
82 union {
83 struct {
84 int result_minsize; /* Input: minimum required
85 size of the result.
86 */
87 int result_maxsize; /* Input: maximum permitted
88 size of the result */
89
90 const char *test_buf; /* Input: test string to verify
91 against */
92 } string_data;
93 struct {
94 const char *action_desc; /* Input */
95 const char *ok_chars; /* Input */
96 const char *cancel_chars; /* Input */
97 } boolean_data;
98 } _;
99
100#define OUT_STRING_FREEABLE 0x01
101 int flags; /* flags for internal use */
102};
103
71UI * 104UI *
72UI_new(void) 105UI_new(void)
73{ 106{