diff options
author | tb <> | 2024-03-02 10:48:17 +0000 |
---|---|---|
committer | tb <> | 2024-03-02 10:48:17 +0000 |
commit | c648127e5d60b32b4c460a1b27578922e2ef72f1 (patch) | |
tree | f13ff63adc4915978763a323143dfba138d48f06 /src | |
parent | 34b7a969db8e49580aefe6f70aea379c76b5586d (diff) | |
download | openbsd-c648127e5d60b32b4c460a1b27578922e2ef72f1.tar.gz openbsd-c648127e5d60b32b4c460a1b27578922e2ef72f1.tar.bz2 openbsd-c648127e5d60b32b4c460a1b27578922e2ef72f1.zip |
Remove unused public X509_TRUST API
Another thing that should never have leaked out of the library. It
will become internal entirely, where the code can be simplified greatly.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/x509.h | 12 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 13 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 81 |
5 files changed, 3 insertions, 123 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 01b8cae19a..56b6392487 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -2835,16 +2835,6 @@ X509_STORE_set_trust | |||
2835 | X509_STORE_set_verify | 2835 | X509_STORE_set_verify |
2836 | X509_STORE_set_verify_cb | 2836 | X509_STORE_set_verify_cb |
2837 | X509_STORE_up_ref | 2837 | X509_STORE_up_ref |
2838 | X509_TRUST_add | ||
2839 | X509_TRUST_cleanup | ||
2840 | X509_TRUST_get0 | ||
2841 | X509_TRUST_get0_name | ||
2842 | X509_TRUST_get_by_id | ||
2843 | X509_TRUST_get_count | ||
2844 | X509_TRUST_get_flags | ||
2845 | X509_TRUST_get_trust | ||
2846 | X509_TRUST_set | ||
2847 | X509_TRUST_set_default | ||
2848 | X509_VAL_free | 2838 | X509_VAL_free |
2849 | X509_VAL_it | 2839 | X509_VAL_it |
2850 | X509_VAL_new | 2840 | X509_VAL_new |
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index 261d03ffb2..d9590797dc 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -301,8 +301,6 @@ _libre_X509_get_default_private_dir | |||
301 | _libre_X509_to_X509_REQ | 301 | _libre_X509_to_X509_REQ |
302 | _libre_X509_REQ_to_X509 | 302 | _libre_X509_REQ_to_X509 |
303 | _libre_X509_get_pubkey_parameters | 303 | _libre_X509_get_pubkey_parameters |
304 | _libre_X509_TRUST_set_default | ||
305 | _libre_X509_TRUST_set | ||
306 | _libre_X509_NAME_oneline | 304 | _libre_X509_NAME_oneline |
307 | _libre_X509_get0_extensions | 305 | _libre_X509_get0_extensions |
308 | _libre_X509_get0_tbs_sigalg | 306 | _libre_X509_get0_tbs_sigalg |
@@ -465,14 +463,6 @@ _libre_X509_verify_cert | |||
465 | _libre_X509_find_by_issuer_and_serial | 463 | _libre_X509_find_by_issuer_and_serial |
466 | _libre_X509_find_by_subject | 464 | _libre_X509_find_by_subject |
467 | _libre_X509_check_trust | 465 | _libre_X509_check_trust |
468 | _libre_X509_TRUST_get_count | ||
469 | _libre_X509_TRUST_get0 | ||
470 | _libre_X509_TRUST_get_by_id | ||
471 | _libre_X509_TRUST_add | ||
472 | _libre_X509_TRUST_cleanup | ||
473 | _libre_X509_TRUST_get_flags | ||
474 | _libre_X509_TRUST_get0_name | ||
475 | _libre_X509_TRUST_get_trust | ||
476 | _libre_X509_up_ref | 466 | _libre_X509_up_ref |
477 | _libre_X509_chain_up_ref | 467 | _libre_X509_chain_up_ref |
478 | _libre_ERR_load_X509_strings | 468 | _libre_ERR_load_X509_strings |
diff --git a/src/lib/libcrypto/hidden/openssl/x509.h b/src/lib/libcrypto/hidden/openssl/x509.h index 13bd5b533b..35a4a67e08 100644 --- a/src/lib/libcrypto/hidden/openssl/x509.h +++ b/src/lib/libcrypto/hidden/openssl/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.3 2023/07/05 21:14:54 bcook Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.4 2024/03/02 10:48:17 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -104,8 +104,6 @@ LCRYPTO_USED(X509_get_default_private_dir); | |||
104 | LCRYPTO_USED(X509_to_X509_REQ); | 104 | LCRYPTO_USED(X509_to_X509_REQ); |
105 | LCRYPTO_USED(X509_REQ_to_X509); | 105 | LCRYPTO_USED(X509_REQ_to_X509); |
106 | LCRYPTO_USED(X509_get_pubkey_parameters); | 106 | LCRYPTO_USED(X509_get_pubkey_parameters); |
107 | LCRYPTO_USED(X509_TRUST_set_default); | ||
108 | LCRYPTO_USED(X509_TRUST_set); | ||
109 | LCRYPTO_USED(X509_NAME_oneline); | 107 | LCRYPTO_USED(X509_NAME_oneline); |
110 | LCRYPTO_USED(X509_get0_extensions); | 108 | LCRYPTO_USED(X509_get0_extensions); |
111 | LCRYPTO_USED(X509_get0_tbs_sigalg); | 109 | LCRYPTO_USED(X509_get0_tbs_sigalg); |
@@ -268,14 +266,6 @@ LCRYPTO_USED(X509_verify_cert); | |||
268 | LCRYPTO_USED(X509_find_by_issuer_and_serial); | 266 | LCRYPTO_USED(X509_find_by_issuer_and_serial); |
269 | LCRYPTO_USED(X509_find_by_subject); | 267 | LCRYPTO_USED(X509_find_by_subject); |
270 | LCRYPTO_USED(X509_check_trust); | 268 | LCRYPTO_USED(X509_check_trust); |
271 | LCRYPTO_USED(X509_TRUST_get_count); | ||
272 | LCRYPTO_USED(X509_TRUST_get0); | ||
273 | LCRYPTO_USED(X509_TRUST_get_by_id); | ||
274 | LCRYPTO_USED(X509_TRUST_add); | ||
275 | LCRYPTO_USED(X509_TRUST_cleanup); | ||
276 | LCRYPTO_USED(X509_TRUST_get_flags); | ||
277 | LCRYPTO_USED(X509_TRUST_get0_name); | ||
278 | LCRYPTO_USED(X509_TRUST_get_trust); | ||
279 | LCRYPTO_USED(X509_up_ref); | 269 | LCRYPTO_USED(X509_up_ref); |
280 | LCRYPTO_USED(X509_chain_up_ref); | 270 | LCRYPTO_USED(X509_chain_up_ref); |
281 | LCRYPTO_USED(ERR_load_X509_strings); | 271 | LCRYPTO_USED(ERR_load_X509_strings); |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index c84ff6b6b3..70d931c578 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.106 2024/03/02 10:33:51 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.107 2024/03/02 10:48:17 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 | * |
@@ -662,8 +662,6 @@ int X509_alias_set1(X509 *x, const unsigned char *name, int len); | |||
662 | int X509_keyid_set1(X509 *x, const unsigned char *id, int len); | 662 | int X509_keyid_set1(X509 *x, const unsigned char *id, int len); |
663 | unsigned char *X509_alias_get0(X509 *x, int *len); | 663 | unsigned char *X509_alias_get0(X509 *x, int *len); |
664 | unsigned char *X509_keyid_get0(X509 *x, int *len); | 664 | unsigned char *X509_keyid_get0(X509 *x, int *len); |
665 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); | ||
666 | int X509_TRUST_set(int *t, int trust); | ||
667 | int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj); | 665 | int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj); |
668 | int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj); | 666 | int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj); |
669 | void X509_trust_clear(X509 *x); | 667 | void X509_trust_clear(X509 *x); |
@@ -1041,15 +1039,6 @@ int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, const unsigned char **pk, | |||
1041 | int *ppklen, X509_ALGOR **pa, X509_PUBKEY *pub); | 1039 | int *ppklen, X509_ALGOR **pa, X509_PUBKEY *pub); |
1042 | 1040 | ||
1043 | int X509_check_trust(X509 *x, int id, int flags); | 1041 | int X509_check_trust(X509 *x, int id, int flags); |
1044 | int X509_TRUST_get_count(void); | ||
1045 | X509_TRUST * X509_TRUST_get0(int idx); | ||
1046 | int X509_TRUST_get_by_id(int id); | ||
1047 | int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | ||
1048 | const char *name, int arg1, void *arg2); | ||
1049 | void X509_TRUST_cleanup(void); | ||
1050 | int X509_TRUST_get_flags(const X509_TRUST *xp); | ||
1051 | char *X509_TRUST_get0_name(const X509_TRUST *xp); | ||
1052 | int X509_TRUST_get_trust(const X509_TRUST *xp); | ||
1053 | 1042 | ||
1054 | int X509_up_ref(X509 *x); | 1043 | int X509_up_ref(X509 *x); |
1055 | STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); | 1044 | STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); |
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index a6fc4d61c5..774ce584b8 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_trs.c,v 1.40 2024/01/13 19:57:38 tb Exp $ */ | 1 | /* $OpenBSD: x509_trs.c,v 1.41 2024/03/02 10:48:17 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -219,82 +219,3 @@ X509_check_trust(X509 *x, int trust_id, int flags) | |||
219 | return trust->check_trust((X509_TRUST *)trust, x, flags); | 219 | return trust->check_trust((X509_TRUST *)trust, x, flags); |
220 | } | 220 | } |
221 | LCRYPTO_ALIAS(X509_check_trust); | 221 | LCRYPTO_ALIAS(X509_check_trust); |
222 | |||
223 | /* | ||
224 | * Remove all the functions below in the next bump. | ||
225 | */ | ||
226 | |||
227 | int | ||
228 | (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int) | ||
229 | { | ||
230 | X509error(ERR_R_DISABLED); | ||
231 | return NULL; | ||
232 | } | ||
233 | LCRYPTO_ALIAS(X509_TRUST_set_default); | ||
234 | |||
235 | int | ||
236 | X509_TRUST_get_count(void) | ||
237 | { | ||
238 | return X509_TRUST_COUNT; | ||
239 | } | ||
240 | LCRYPTO_ALIAS(X509_TRUST_get_count); | ||
241 | |||
242 | X509_TRUST * | ||
243 | X509_TRUST_get0(int idx) | ||
244 | { | ||
245 | X509error(ERR_R_DISABLED); | ||
246 | return NULL; | ||
247 | } | ||
248 | LCRYPTO_ALIAS(X509_TRUST_get0); | ||
249 | |||
250 | int | ||
251 | X509_TRUST_get_by_id(int id) | ||
252 | { | ||
253 | X509error(ERR_R_DISABLED); | ||
254 | return -1; | ||
255 | } | ||
256 | LCRYPTO_ALIAS(X509_TRUST_get_by_id); | ||
257 | |||
258 | int | ||
259 | X509_TRUST_set(int *t, int trust) | ||
260 | { | ||
261 | X509error(ERR_R_DISABLED); | ||
262 | return 0; | ||
263 | } | ||
264 | LCRYPTO_ALIAS(X509_TRUST_set); | ||
265 | |||
266 | int | ||
267 | X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | ||
268 | const char *name, int arg1, void *arg2) | ||
269 | { | ||
270 | X509error(ERR_R_DISABLED); | ||
271 | return 0; | ||
272 | } | ||
273 | LCRYPTO_ALIAS(X509_TRUST_add); | ||
274 | |||
275 | void | ||
276 | X509_TRUST_cleanup(void) | ||
277 | { | ||
278 | } | ||
279 | LCRYPTO_ALIAS(X509_TRUST_cleanup); | ||
280 | |||
281 | int | ||
282 | X509_TRUST_get_flags(const X509_TRUST *xp) | ||
283 | { | ||
284 | return xp->flags; | ||
285 | } | ||
286 | LCRYPTO_ALIAS(X509_TRUST_get_flags); | ||
287 | |||
288 | char * | ||
289 | X509_TRUST_get0_name(const X509_TRUST *xp) | ||
290 | { | ||
291 | return xp->name; | ||
292 | } | ||
293 | LCRYPTO_ALIAS(X509_TRUST_get0_name); | ||
294 | |||
295 | int | ||
296 | X509_TRUST_get_trust(const X509_TRUST *xp) | ||
297 | { | ||
298 | return xp->trust; | ||
299 | } | ||
300 | LCRYPTO_ALIAS(X509_TRUST_get_trust); | ||