summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2024-08-31 10:09:15 +0000
committertb <>2024-08-31 10:09:15 +0000
commit7031212164b5493a716d2d9cd97186e6adf787b9 (patch)
treeaf227e35499945986146cedd3760679f2db1da3c /src/lib
parenta4fd3fb5ec8d3391f1b7e15afe45d3e49c63f507 (diff)
downloadopenbsd-7031212164b5493a716d2d9cd97186e6adf787b9.tar.gz
openbsd-7031212164b5493a716d2d9cd97186e6adf787b9.tar.bz2
openbsd-7031212164b5493a716d2d9cd97186e6adf787b9.zip
Remove ERR_add_{,v}data()
Another unused bit of legacy API... ok beck jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/Symbols.list2
-rw-r--r--src/lib/libcrypto/err/err.c33
-rw-r--r--src/lib/libcrypto/err/err.h4
-rw-r--r--src/lib/libcrypto/hidden/openssl/err.h4
4 files changed, 3 insertions, 40 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index 9405613b18..3c14b481ad 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -1006,8 +1006,6 @@ ENGINE_new
1006ENGINE_register_all_complete 1006ENGINE_register_all_complete
1007ENGINE_set_default 1007ENGINE_set_default
1008ENGINE_set_default_RSA 1008ENGINE_set_default_RSA
1009ERR_add_error_data
1010ERR_add_error_vdata
1011ERR_asprintf_error_data 1009ERR_asprintf_error_data
1012ERR_clear_error 1010ERR_clear_error
1013ERR_error_string 1011ERR_error_string
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index e40b52f5ec..d8ad4f8bab 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.c,v 1.62 2024/07/09 07:17:13 beck Exp $ */ 1/* $OpenBSD: err.c,v 1.63 2024/08/31 10:09:15 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1130,37 +1130,6 @@ ERR_asprintf_error_data(char * format, ...)
1130} 1130}
1131LCRYPTO_ALIAS(ERR_asprintf_error_data); 1131LCRYPTO_ALIAS(ERR_asprintf_error_data);
1132 1132
1133void
1134ERR_add_error_vdata(int num, va_list args)
1135{
1136 char format[129];
1137 char *errbuf;
1138 int i;
1139
1140 format[0] = '\0';
1141 for (i = 0; i < num; i++) {
1142 if (strlcat(format, "%s", sizeof(format)) >= sizeof(format)) {
1143 ERR_set_error_data("too many errors", ERR_TXT_STRING);
1144 return;
1145 }
1146 }
1147 if (vasprintf(&errbuf, format, args) == -1)
1148 ERR_set_error_data("malloc failed", ERR_TXT_STRING);
1149 else
1150 ERR_set_error_data(errbuf, ERR_TXT_MALLOCED|ERR_TXT_STRING);
1151}
1152LCRYPTO_ALIAS(ERR_add_error_vdata);
1153
1154void
1155ERR_add_error_data(int num, ...)
1156{
1157 va_list args;
1158 va_start(args, num);
1159 ERR_add_error_vdata(num, args);
1160 va_end(args);
1161}
1162LCRYPTO_ALIAS(ERR_add_error_data);
1163
1164int 1133int
1165ERR_set_mark(void) 1134ERR_set_mark(void)
1166{ 1135{
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h
index 9f64dd2797..66bd54deec 100644
--- a/src/lib/libcrypto/err/err.h
+++ b/src/lib/libcrypto/err/err.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.h,v 1.34 2024/07/09 07:17:13 beck Exp $ */ 1/* $OpenBSD: err.h,v 1.35 2024/08/31 10:09:15 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -374,8 +374,6 @@ void ERR_print_errors_fp(FILE *fp);
374void ERR_print_errors(BIO *bp); 374void ERR_print_errors(BIO *bp);
375#endif 375#endif
376void ERR_asprintf_error_data(char * format, ...); 376void ERR_asprintf_error_data(char * format, ...);
377void ERR_add_error_data(int num, ...);
378void ERR_add_error_vdata(int num, va_list args);
379void ERR_load_strings(int lib, ERR_STRING_DATA *str); 377void ERR_load_strings(int lib, ERR_STRING_DATA *str);
380void ERR_unload_strings(int lib, ERR_STRING_DATA *str); 378void ERR_unload_strings(int lib, ERR_STRING_DATA *str);
381void ERR_load_ERR_strings(void); 379void ERR_load_ERR_strings(void);
diff --git a/src/lib/libcrypto/hidden/openssl/err.h b/src/lib/libcrypto/hidden/openssl/err.h
index 5a5893f813..026c18a545 100644
--- a/src/lib/libcrypto/hidden/openssl/err.h
+++ b/src/lib/libcrypto/hidden/openssl/err.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: err.h,v 1.6 2024/07/09 07:17:13 beck Exp $ */ 1/* $OpenBSD: err.h,v 1.7 2024/08/31 10:09:15 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -56,7 +56,5 @@ LCRYPTO_USED(ERR_remove_state);
56LCRYPTO_USED(ERR_get_next_error_library); 56LCRYPTO_USED(ERR_get_next_error_library);
57LCRYPTO_USED(ERR_set_mark); 57LCRYPTO_USED(ERR_set_mark);
58LCRYPTO_USED(ERR_pop_to_mark); 58LCRYPTO_USED(ERR_pop_to_mark);
59LCRYPTO_UNUSED(ERR_add_error_data);
60LCRYPTO_UNUSED(ERR_add_error_vdata);
61 59
62#endif /* _LIBCRYPTO_ERR_H */ 60#endif /* _LIBCRYPTO_ERR_H */