diff options
author | tb <> | 2024-08-31 10:09:15 +0000 |
---|---|---|
committer | tb <> | 2024-08-31 10:09:15 +0000 |
commit | 7031212164b5493a716d2d9cd97186e6adf787b9 (patch) | |
tree | af227e35499945986146cedd3760679f2db1da3c /src/lib | |
parent | a4fd3fb5ec8d3391f1b7e15afe45d3e49c63f507 (diff) | |
download | openbsd-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.list | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.c | 33 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/err.h | 4 |
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 | |||
1006 | ENGINE_register_all_complete | 1006 | ENGINE_register_all_complete |
1007 | ENGINE_set_default | 1007 | ENGINE_set_default |
1008 | ENGINE_set_default_RSA | 1008 | ENGINE_set_default_RSA |
1009 | ERR_add_error_data | ||
1010 | ERR_add_error_vdata | ||
1011 | ERR_asprintf_error_data | 1009 | ERR_asprintf_error_data |
1012 | ERR_clear_error | 1010 | ERR_clear_error |
1013 | ERR_error_string | 1011 | ERR_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 | } |
1131 | LCRYPTO_ALIAS(ERR_asprintf_error_data); | 1131 | LCRYPTO_ALIAS(ERR_asprintf_error_data); |
1132 | 1132 | ||
1133 | void | ||
1134 | ERR_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 | } | ||
1152 | LCRYPTO_ALIAS(ERR_add_error_vdata); | ||
1153 | |||
1154 | void | ||
1155 | ERR_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 | } | ||
1162 | LCRYPTO_ALIAS(ERR_add_error_data); | ||
1163 | |||
1164 | int | 1133 | int |
1165 | ERR_set_mark(void) | 1134 | ERR_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); | |||
374 | void ERR_print_errors(BIO *bp); | 374 | void ERR_print_errors(BIO *bp); |
375 | #endif | 375 | #endif |
376 | void ERR_asprintf_error_data(char * format, ...); | 376 | void ERR_asprintf_error_data(char * format, ...); |
377 | void ERR_add_error_data(int num, ...); | ||
378 | void ERR_add_error_vdata(int num, va_list args); | ||
379 | void ERR_load_strings(int lib, ERR_STRING_DATA *str); | 377 | void ERR_load_strings(int lib, ERR_STRING_DATA *str); |
380 | void ERR_unload_strings(int lib, ERR_STRING_DATA *str); | 378 | void ERR_unload_strings(int lib, ERR_STRING_DATA *str); |
381 | void ERR_load_ERR_strings(void); | 379 | void 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); | |||
56 | LCRYPTO_USED(ERR_get_next_error_library); | 56 | LCRYPTO_USED(ERR_get_next_error_library); |
57 | LCRYPTO_USED(ERR_set_mark); | 57 | LCRYPTO_USED(ERR_set_mark); |
58 | LCRYPTO_USED(ERR_pop_to_mark); | 58 | LCRYPTO_USED(ERR_pop_to_mark); |
59 | LCRYPTO_UNUSED(ERR_add_error_data); | ||
60 | LCRYPTO_UNUSED(ERR_add_error_vdata); | ||
61 | 59 | ||
62 | #endif /* _LIBCRYPTO_ERR_H */ | 60 | #endif /* _LIBCRYPTO_ERR_H */ |