summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ui
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-02-16 08:38:18 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-02-16 08:38:18 +0000
commit6d469a7e426c54c2c818f52f26357e3e6a93c10b (patch)
tree51cf8d1b29a9e7b206a5d5ef900e1a4e7c5d214f /lib/libcrypto/ui
parent1888ae3bff0d9bb971e3bdcf160c53474c03e226 (diff)
libressl *_namespace.h: adjust *_ALIAS() to require a semicolon
LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon. This does not conform to style(9), breaks editors and ctags and (most importantly) my workflow. Fix this by neutering them with asm("") so that -Wpedantic doesn't complain. There's precedent in libc's namespace.h fix suggested by & ok jsing
Diffstat (limited to 'lib/libcrypto/ui')
-rw-r--r--lib/libcrypto/ui/ui_err.c4
-rw-r--r--lib/libcrypto/ui/ui_lib.c100
-rw-r--r--lib/libcrypto/ui/ui_null.c4
-rw-r--r--lib/libcrypto/ui/ui_openssl.c4
-rw-r--r--lib/libcrypto/ui/ui_util.c6
5 files changed, 59 insertions, 59 deletions
diff --git a/lib/libcrypto/ui/ui_err.c b/lib/libcrypto/ui/ui_err.c
index a1207fb0c38..3f875da7767 100644
--- a/lib/libcrypto/ui/ui_err.c
+++ b/lib/libcrypto/ui/ui_err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui_err.c,v 1.11 2022/11/12 13:16:10 beck Exp $ */
+/* $OpenBSD: ui_err.c,v 1.12 2023/02/16 08:38:17 tb Exp $ */
/* ====================================================================
* Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
*
@@ -93,4 +93,4 @@ ERR_load_UI_strings(void)
}
#endif
}
-LCRYPTO_ALIAS(ERR_load_UI_strings)
+LCRYPTO_ALIAS(ERR_load_UI_strings);
diff --git a/lib/libcrypto/ui/ui_lib.c b/lib/libcrypto/ui/ui_lib.c
index 546540ad83e..73d899afcce 100644
--- a/lib/libcrypto/ui/ui_lib.c
+++ b/lib/libcrypto/ui/ui_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui_lib.c,v 1.50 2022/12/23 02:31:56 jsing Exp $ */
+/* $OpenBSD: ui_lib.c,v 1.51 2023/02/16 08:38:17 tb Exp $ */
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
* project 2001.
*/
@@ -73,7 +73,7 @@ UI_new(void)
{
return (UI_new_method(NULL));
}
-LCRYPTO_ALIAS(UI_new)
+LCRYPTO_ALIAS(UI_new);
UI *
UI_new_method(const UI_METHOD *method)
@@ -90,7 +90,7 @@ UI_new_method(const UI_METHOD *method)
return ret;
}
-LCRYPTO_ALIAS(UI_new_method)
+LCRYPTO_ALIAS(UI_new_method);
static void
free_string(UI_STRING *uis)
@@ -122,7 +122,7 @@ UI_free(UI *ui)
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_UI, ui, &ui->ex_data);
free(ui);
}
-LCRYPTO_ALIAS(UI_free)
+LCRYPTO_ALIAS(UI_free);
static int
allocate_string_stack(UI *ui)
@@ -269,7 +269,7 @@ UI_add_input_string(UI *ui, const char *prompt, int flags, char *result_buf,
return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags,
result_buf, minsize, maxsize, NULL);
}
-LCRYPTO_ALIAS(UI_add_input_string)
+LCRYPTO_ALIAS(UI_add_input_string);
/* Same as UI_add_input_string(), excepts it takes a copy of the prompt. */
int
@@ -279,7 +279,7 @@ UI_dup_input_string(UI *ui, const char *prompt, int flags, char *result_buf,
return general_allocate_string(ui, prompt, 1, UIT_PROMPT, flags,
result_buf, minsize, maxsize, NULL);
}
-LCRYPTO_ALIAS(UI_dup_input_string)
+LCRYPTO_ALIAS(UI_dup_input_string);
int
UI_add_verify_string(UI *ui, const char *prompt, int flags, char *result_buf,
@@ -288,7 +288,7 @@ UI_add_verify_string(UI *ui, const char *prompt, int flags, char *result_buf,
return general_allocate_string(ui, prompt, 0, UIT_VERIFY, flags,
result_buf, minsize, maxsize, test_buf);
}
-LCRYPTO_ALIAS(UI_add_verify_string)
+LCRYPTO_ALIAS(UI_add_verify_string);
int
UI_dup_verify_string(UI *ui, const char *prompt, int flags,
@@ -297,7 +297,7 @@ UI_dup_verify_string(UI *ui, const char *prompt, int flags,
return general_allocate_string(ui, prompt, 1, UIT_VERIFY, flags,
result_buf, minsize, maxsize, test_buf);
}
-LCRYPTO_ALIAS(UI_dup_verify_string)
+LCRYPTO_ALIAS(UI_dup_verify_string);
int
UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
@@ -306,7 +306,7 @@ UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
return general_allocate_boolean(ui, prompt, action_desc, ok_chars,
cancel_chars, 0, UIT_BOOLEAN, flags, result_buf);
}
-LCRYPTO_ALIAS(UI_add_input_boolean)
+LCRYPTO_ALIAS(UI_add_input_boolean);
int
UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
@@ -315,7 +315,7 @@ UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
return general_allocate_boolean(ui, prompt, action_desc, ok_chars,
cancel_chars, 1, UIT_BOOLEAN, flags, result_buf);
}
-LCRYPTO_ALIAS(UI_dup_input_boolean)
+LCRYPTO_ALIAS(UI_dup_input_boolean);
int
UI_add_info_string(UI *ui, const char *text)
@@ -323,7 +323,7 @@ UI_add_info_string(UI *ui, const char *text)
return general_allocate_string(ui, text, 0, UIT_INFO, 0, NULL, 0, 0,
NULL);
}
-LCRYPTO_ALIAS(UI_add_info_string)
+LCRYPTO_ALIAS(UI_add_info_string);
int
UI_dup_info_string(UI *ui, const char *text)
@@ -331,7 +331,7 @@ UI_dup_info_string(UI *ui, const char *text)
return general_allocate_string(ui, text, 1, UIT_INFO, 0, NULL, 0, 0,
NULL);
}
-LCRYPTO_ALIAS(UI_dup_info_string)
+LCRYPTO_ALIAS(UI_dup_info_string);
int
UI_add_error_string(UI *ui, const char *text)
@@ -339,7 +339,7 @@ UI_add_error_string(UI *ui, const char *text)
return general_allocate_string(ui, text, 0, UIT_ERROR, 0, NULL, 0, 0,
NULL);
}
-LCRYPTO_ALIAS(UI_add_error_string)
+LCRYPTO_ALIAS(UI_add_error_string);
int
UI_dup_error_string(UI *ui, const char *text)
@@ -347,7 +347,7 @@ UI_dup_error_string(UI *ui, const char *text)
return general_allocate_string(ui, text, 1, UIT_ERROR, 0, NULL, 0, 0,
NULL);
}
-LCRYPTO_ALIAS(UI_dup_error_string)
+LCRYPTO_ALIAS(UI_dup_error_string);
char *
UI_construct_prompt(UI *ui, const char *object_desc, const char *object_name)
@@ -372,7 +372,7 @@ UI_construct_prompt(UI *ui, const char *object_desc, const char *object_name)
return prompt;
}
-LCRYPTO_ALIAS(UI_construct_prompt)
+LCRYPTO_ALIAS(UI_construct_prompt);
void *
UI_add_user_data(UI *ui, void *user_data)
@@ -383,14 +383,14 @@ UI_add_user_data(UI *ui, void *user_data)
return old_data;
}
-LCRYPTO_ALIAS(UI_add_user_data)
+LCRYPTO_ALIAS(UI_add_user_data);
void *
UI_get0_user_data(UI *ui)
{
return ui->user_data;
}
-LCRYPTO_ALIAS(UI_get0_user_data)
+LCRYPTO_ALIAS(UI_get0_user_data);
const char *
UI_get0_result(UI *ui, int i)
@@ -405,7 +405,7 @@ UI_get0_result(UI *ui, int i)
}
return UI_get0_result_string(sk_UI_STRING_value(ui->strings, i));
}
-LCRYPTO_ALIAS(UI_get0_result)
+LCRYPTO_ALIAS(UI_get0_result);
static int
print_error(const char *str, size_t len, void *arg)
@@ -479,7 +479,7 @@ UI_process(UI *ui)
return -1;
return ok;
}
-LCRYPTO_ALIAS(UI_process)
+LCRYPTO_ALIAS(UI_process);
int
UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void))
@@ -507,7 +507,7 @@ UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void))
UIerror(UI_R_UNKNOWN_CONTROL_COMMAND);
return -1;
}
-LCRYPTO_ALIAS(UI_ctrl)
+LCRYPTO_ALIAS(UI_ctrl);
int
UI_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
@@ -516,28 +516,28 @@ UI_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, argl, argp,
new_func, dup_func, free_func);
}
-LCRYPTO_ALIAS(UI_get_ex_new_index)
+LCRYPTO_ALIAS(UI_get_ex_new_index);
int
UI_set_ex_data(UI *r, int idx, void *arg)
{
return (CRYPTO_set_ex_data(&r->ex_data, idx, arg));
}
-LCRYPTO_ALIAS(UI_set_ex_data)
+LCRYPTO_ALIAS(UI_set_ex_data);
void *
UI_get_ex_data(UI *r, int idx)
{
return (CRYPTO_get_ex_data(&r->ex_data, idx));
}
-LCRYPTO_ALIAS(UI_get_ex_data)
+LCRYPTO_ALIAS(UI_get_ex_data);
void
UI_set_default_method(const UI_METHOD *method)
{
default_UI_meth = method;
}
-LCRYPTO_ALIAS(UI_set_default_method)
+LCRYPTO_ALIAS(UI_set_default_method);
const UI_METHOD *
UI_get_default_method(void)
@@ -547,14 +547,14 @@ UI_get_default_method(void)
return default_UI_meth;
}
-LCRYPTO_ALIAS(UI_get_default_method)
+LCRYPTO_ALIAS(UI_get_default_method);
const UI_METHOD *
UI_get_method(UI *ui)
{
return ui->meth;
}
-LCRYPTO_ALIAS(UI_get_method)
+LCRYPTO_ALIAS(UI_get_method);
const UI_METHOD *
UI_set_method(UI *ui, const UI_METHOD *method)
@@ -563,7 +563,7 @@ UI_set_method(UI *ui, const UI_METHOD *method)
return ui->meth;
}
-LCRYPTO_ALIAS(UI_set_method)
+LCRYPTO_ALIAS(UI_set_method);
UI_METHOD *
UI_create_method(const char *name)
@@ -585,7 +585,7 @@ UI_create_method(const char *name)
return NULL;
}
-LCRYPTO_ALIAS(UI_create_method)
+LCRYPTO_ALIAS(UI_create_method);
void
UI_destroy_method(UI_METHOD *method)
@@ -596,7 +596,7 @@ UI_destroy_method(UI_METHOD *method)
free(method->name);
free(method);
}
-LCRYPTO_ALIAS(UI_destroy_method)
+LCRYPTO_ALIAS(UI_destroy_method);
int
UI_method_set_opener(UI_METHOD *method, int (*opener)(UI *ui))
@@ -608,7 +608,7 @@ UI_method_set_opener(UI_METHOD *method, int (*opener)(UI *ui))
return 0;
}
-LCRYPTO_ALIAS(UI_method_set_opener)
+LCRYPTO_ALIAS(UI_method_set_opener);
int
UI_method_set_writer(UI_METHOD *method, int (*writer)(UI *ui, UI_STRING *uis))
@@ -620,7 +620,7 @@ UI_method_set_writer(UI_METHOD *method, int (*writer)(UI *ui, UI_STRING *uis))
return 0;
}
-LCRYPTO_ALIAS(UI_method_set_writer)
+LCRYPTO_ALIAS(UI_method_set_writer);
int
UI_method_set_flusher(UI_METHOD *method, int (*flusher)(UI *ui))
@@ -632,7 +632,7 @@ UI_method_set_flusher(UI_METHOD *method, int (*flusher)(UI *ui))
return 0;
}
-LCRYPTO_ALIAS(UI_method_set_flusher)
+LCRYPTO_ALIAS(UI_method_set_flusher);
int
UI_method_set_reader(UI_METHOD *method, int (*reader)(UI *ui, UI_STRING *uis))
@@ -644,7 +644,7 @@ UI_method_set_reader(UI_METHOD *method, int (*reader)(UI *ui, UI_STRING *uis))
return 0;
}
-LCRYPTO_ALIAS(UI_method_set_reader)
+LCRYPTO_ALIAS(UI_method_set_reader);
int
UI_method_set_closer(UI_METHOD *method, int (*closer)(UI *ui))
@@ -656,7 +656,7 @@ UI_method_set_closer(UI_METHOD *method, int (*closer)(UI *ui))
return 0;
}
-LCRYPTO_ALIAS(UI_method_set_closer)
+LCRYPTO_ALIAS(UI_method_set_closer);
int
UI_method_set_prompt_constructor(UI_METHOD *method,
@@ -670,7 +670,7 @@ UI_method_set_prompt_constructor(UI_METHOD *method,
return 0;
}
-LCRYPTO_ALIAS(UI_method_set_prompt_constructor)
+LCRYPTO_ALIAS(UI_method_set_prompt_constructor);
int
(*UI_method_get_opener(const UI_METHOD * method))(UI *)
@@ -680,7 +680,7 @@ int
return method->ui_open_session;
}
-LCRYPTO_ALIAS(UI_method_get_opener)
+LCRYPTO_ALIAS(UI_method_get_opener);
int
(*UI_method_get_writer(const UI_METHOD *method))(UI *, UI_STRING *)
@@ -690,7 +690,7 @@ int
return method->ui_write_string;
}
-LCRYPTO_ALIAS(UI_method_get_writer)
+LCRYPTO_ALIAS(UI_method_get_writer);
int
(*UI_method_get_flusher(const UI_METHOD *method)) (UI *)
@@ -700,7 +700,7 @@ int
return method->ui_flush;
}
-LCRYPTO_ALIAS(UI_method_get_flusher)
+LCRYPTO_ALIAS(UI_method_get_flusher);
int
(*UI_method_get_reader(const UI_METHOD *method))(UI *, UI_STRING *)
@@ -710,7 +710,7 @@ int
return method->ui_read_string;
}
-LCRYPTO_ALIAS(UI_method_get_reader)
+LCRYPTO_ALIAS(UI_method_get_reader);
int
(*UI_method_get_closer(const UI_METHOD *method))(UI *)
@@ -720,7 +720,7 @@ int
return method->ui_close_session;
}
-LCRYPTO_ALIAS(UI_method_get_closer)
+LCRYPTO_ALIAS(UI_method_get_closer);
char *
(*UI_method_get_prompt_constructor(const UI_METHOD *method))(UI *, const char *,
@@ -731,7 +731,7 @@ char *
return method->ui_construct_prompt;
}
-LCRYPTO_ALIAS(UI_method_get_prompt_constructor)
+LCRYPTO_ALIAS(UI_method_get_prompt_constructor);
enum UI_string_types
UI_get_string_type(UI_STRING *uis)
@@ -741,7 +741,7 @@ UI_get_string_type(UI_STRING *uis)
return uis->type;
}
-LCRYPTO_ALIAS(UI_get_string_type)
+LCRYPTO_ALIAS(UI_get_string_type);
int
UI_get_input_flags(UI_STRING *uis)
@@ -751,7 +751,7 @@ UI_get_input_flags(UI_STRING *uis)
return uis->input_flags;
}
-LCRYPTO_ALIAS(UI_get_input_flags)
+LCRYPTO_ALIAS(UI_get_input_flags);
const char *
UI_get0_output_string(UI_STRING *uis)
@@ -761,7 +761,7 @@ UI_get0_output_string(UI_STRING *uis)
return uis->out_string;
}
-LCRYPTO_ALIAS(UI_get0_output_string)
+LCRYPTO_ALIAS(UI_get0_output_string);
const char *
UI_get0_action_string(UI_STRING *uis)
@@ -777,7 +777,7 @@ UI_get0_action_string(UI_STRING *uis)
return NULL;
}
}
-LCRYPTO_ALIAS(UI_get0_action_string)
+LCRYPTO_ALIAS(UI_get0_action_string);
const char *
UI_get0_result_string(UI_STRING *uis)
@@ -793,7 +793,7 @@ UI_get0_result_string(UI_STRING *uis)
return NULL;
}
}
-LCRYPTO_ALIAS(UI_get0_result_string)
+LCRYPTO_ALIAS(UI_get0_result_string);
const char *
UI_get0_test_string(UI_STRING *uis)
@@ -808,7 +808,7 @@ UI_get0_test_string(UI_STRING *uis)
return NULL;
}
}
-LCRYPTO_ALIAS(UI_get0_test_string)
+LCRYPTO_ALIAS(UI_get0_test_string);
int
UI_get_result_minsize(UI_STRING *uis)
@@ -824,7 +824,7 @@ UI_get_result_minsize(UI_STRING *uis)
return -1;
}
}
-LCRYPTO_ALIAS(UI_get_result_minsize)
+LCRYPTO_ALIAS(UI_get_result_minsize);
int
UI_get_result_maxsize(UI_STRING *uis)
@@ -840,7 +840,7 @@ UI_get_result_maxsize(UI_STRING *uis)
return -1;
}
}
-LCRYPTO_ALIAS(UI_get_result_maxsize)
+LCRYPTO_ALIAS(UI_get_result_maxsize);
int
UI_set_result(UI *ui, UI_STRING *uis, const char *result)
@@ -904,4 +904,4 @@ UI_set_result(UI *ui, UI_STRING *uis, const char *result)
}
return 0;
}
-LCRYPTO_ALIAS(UI_set_result)
+LCRYPTO_ALIAS(UI_set_result);
diff --git a/lib/libcrypto/ui/ui_null.c b/lib/libcrypto/ui/ui_null.c
index 7bb7a90b2fb..cbc9a5025bf 100644
--- a/lib/libcrypto/ui/ui_null.c
+++ b/lib/libcrypto/ui/ui_null.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui_null.c,v 1.1 2022/12/17 21:59:39 tb Exp $ */
+/* $OpenBSD: ui_null.c,v 1.2 2023/02/16 08:38:17 tb Exp $ */
/*
* Written by Theo Buehler. Public domain.
@@ -15,4 +15,4 @@ UI_null(void)
{
return &ui_null;
}
-LCRYPTO_ALIAS(UI_null)
+LCRYPTO_ALIAS(UI_null);
diff --git a/lib/libcrypto/ui/ui_openssl.c b/lib/libcrypto/ui/ui_openssl.c
index 0d2e6f1ac86..0b91700571a 100644
--- a/lib/libcrypto/ui/ui_openssl.c
+++ b/lib/libcrypto/ui/ui_openssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui_openssl.c,v 1.27 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: ui_openssl.c,v 1.28 2023/02/16 08:38:17 tb Exp $ */
/* Written by Richard Levitte (richard@levitte.org) and others
* for the OpenSSL project 2001.
*/
@@ -167,7 +167,7 @@ UI_OpenSSL(void)
{
return &ui_openssl;
}
-LCRYPTO_ALIAS(UI_OpenSSL)
+LCRYPTO_ALIAS(UI_OpenSSL);
/* The following function makes sure that info and error strings are printed
before any prompt. */
diff --git a/lib/libcrypto/ui/ui_util.c b/lib/libcrypto/ui/ui_util.c
index 5e7048531cc..4fa4058cd46 100644
--- a/lib/libcrypto/ui/ui_util.c
+++ b/lib/libcrypto/ui/ui_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui_util.c,v 1.13 2022/12/23 02:20:28 jsing Exp $ */
+/* $OpenBSD: ui_util.c,v 1.14 2023/02/16 08:38:17 tb Exp $ */
/* ====================================================================
* Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved.
*
@@ -70,7 +70,7 @@ UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, int verify)
explicit_bzero(buff, BUFSIZ);
return (ret);
}
-LCRYPTO_ALIAS(UI_UTIL_read_pw_string)
+LCRYPTO_ALIAS(UI_UTIL_read_pw_string);
int
UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, int verify)
@@ -95,4 +95,4 @@ UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, int verify)
ok = 0;
return (ok);
}
-LCRYPTO_ALIAS(UI_UTIL_read_pw)
+LCRYPTO_ALIAS(UI_UTIL_read_pw);