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/libcrypto/err | |
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/libcrypto/err')
-rw-r--r-- | src/lib/libcrypto/err/err.c | 33 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.h | 4 |
2 files changed, 2 insertions, 35 deletions
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); |