From 1bd3db3b28b123d1adeffcb69b8d4020de53bb57 Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 19 May 2026 09:17:44 +0000 Subject: libcrypto/ui: move ui_string_st to ui_lib.c. It's only used there. --- src/lib/libcrypto/ui/ui_lib.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/ui/ui_lib.c') 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 @@ -/* $OpenBSD: ui_lib.c,v 1.52 2025/05/10 05:54:39 tb Exp $ */ +/* $OpenBSD: ui_lib.c,v 1.53 2026/05/19 09:17:44 tb Exp $ */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2001. */ @@ -68,6 +68,39 @@ static const UI_METHOD *default_UI_meth = NULL; +struct ui_string_st { + enum UI_string_types type; /* Input */ + const char *out_string; /* Input */ + int input_flags; /* Flags from the user */ + + /* The following parameters are completely irrelevant for UIT_INFO, + and can therefore be set to 0 or NULL */ + char *result_buf; /* Input and Output: If not NULL, user-defined + with size in result_maxsize. Otherwise, it + may be allocated by the UI routine, meaning + result_minsize is going to be overwritten.*/ + union { + struct { + int result_minsize; /* Input: minimum required + size of the result. + */ + int result_maxsize; /* Input: maximum permitted + size of the result */ + + const char *test_buf; /* Input: test string to verify + against */ + } string_data; + struct { + const char *action_desc; /* Input */ + const char *ok_chars; /* Input */ + const char *cancel_chars; /* Input */ + } boolean_data; + } _; + +#define OUT_STRING_FREEABLE 0x01 + int flags; /* flags for internal use */ +}; + UI * UI_new(void) { -- cgit v1.2.3-55-g6feb