diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ui/ui_lib.c | 35 | ||||
| -rw-r--r-- | src/lib/libcrypto/ui/ui_local.h | 35 |
2 files changed, 35 insertions, 35 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 | ||
| 69 | static const UI_METHOD *default_UI_meth = NULL; | 69 | static const UI_METHOD *default_UI_meth = NULL; |
| 70 | 70 | ||
| 71 | struct 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 | |||
| 71 | UI * | 104 | UI * |
| 72 | UI_new(void) | 105 | UI_new(void) |
| 73 | { | 106 | { |
diff --git a/src/lib/libcrypto/ui/ui_local.h b/src/lib/libcrypto/ui/ui_local.h index 460b5600bd..065dc0b11f 100644 --- a/src/lib/libcrypto/ui/ui_local.h +++ b/src/lib/libcrypto/ui/ui_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ui_local.h,v 1.2 2022/11/26 17:23:18 tb Exp $ */ | 1 | /* $OpenBSD: ui_local.h,v 1.3 2026/05/19 09:17:44 tb Exp $ */ |
| 2 | 2 | ||
| 3 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 3 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
| 4 | * project 2001. | 4 | * project 2001. |
| @@ -101,39 +101,6 @@ struct ui_method_st { | |||
| 101 | const char *object_name); | 101 | const char *object_name); |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | struct ui_string_st { | ||
| 105 | enum UI_string_types type; /* Input */ | ||
| 106 | const char *out_string; /* Input */ | ||
| 107 | int input_flags; /* Flags from the user */ | ||
| 108 | |||
| 109 | /* The following parameters are completely irrelevant for UIT_INFO, | ||
| 110 | and can therefore be set to 0 or NULL */ | ||
| 111 | char *result_buf; /* Input and Output: If not NULL, user-defined | ||
| 112 | with size in result_maxsize. Otherwise, it | ||
| 113 | may be allocated by the UI routine, meaning | ||
| 114 | result_minsize is going to be overwritten.*/ | ||
| 115 | union { | ||
| 116 | struct { | ||
| 117 | int result_minsize; /* Input: minimum required | ||
| 118 | size of the result. | ||
| 119 | */ | ||
| 120 | int result_maxsize; /* Input: maximum permitted | ||
| 121 | size of the result */ | ||
| 122 | |||
| 123 | const char *test_buf; /* Input: test string to verify | ||
| 124 | against */ | ||
| 125 | } string_data; | ||
| 126 | struct { | ||
| 127 | const char *action_desc; /* Input */ | ||
| 128 | const char *ok_chars; /* Input */ | ||
| 129 | const char *cancel_chars; /* Input */ | ||
| 130 | } boolean_data; | ||
| 131 | } _; | ||
| 132 | |||
| 133 | #define OUT_STRING_FREEABLE 0x01 | ||
| 134 | int flags; /* flags for internal use */ | ||
| 135 | }; | ||
| 136 | |||
| 137 | struct ui_st { | 104 | struct ui_st { |
| 138 | const UI_METHOD *meth; | 105 | const UI_METHOD *meth; |
| 139 | STACK_OF(UI_STRING) *strings; /* We might want to prompt for more | 106 | STACK_OF(UI_STRING) *strings; /* We might want to prompt for more |
