summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509
diff options
context:
space:
mode:
authortb <>2024-03-02 10:48:17 +0000
committertb <>2024-03-02 10:48:17 +0000
commitbd61e1e1013cfd2b6462e4fbf774072eb184c44c (patch)
treef13ff63adc4915978763a323143dfba138d48f06 /src/lib/libcrypto/x509
parent83f478fb201e647181d2250ce31e9359bdca5065 (diff)
downloadopenbsd-bd61e1e1013cfd2b6462e4fbf774072eb184c44c.tar.gz
openbsd-bd61e1e1013cfd2b6462e4fbf774072eb184c44c.tar.bz2
openbsd-bd61e1e1013cfd2b6462e4fbf774072eb184c44c.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/lib/libcrypto/x509')
-rw-r--r--src/lib/libcrypto/x509/x509.h13
-rw-r--r--src/lib/libcrypto/x509/x509_trs.c81
2 files changed, 2 insertions, 92 deletions
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);
662int X509_keyid_set1(X509 *x, const unsigned char *id, int len); 662int X509_keyid_set1(X509 *x, const unsigned char *id, int len);
663unsigned char *X509_alias_get0(X509 *x, int *len); 663unsigned char *X509_alias_get0(X509 *x, int *len);
664unsigned char *X509_keyid_get0(X509 *x, int *len); 664unsigned char *X509_keyid_get0(X509 *x, int *len);
665int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int);
666int X509_TRUST_set(int *t, int trust);
667int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj); 665int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
668int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj); 666int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj);
669void X509_trust_clear(X509 *x); 667void 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
1043int X509_check_trust(X509 *x, int id, int flags); 1041int X509_check_trust(X509 *x, int id, int flags);
1044int X509_TRUST_get_count(void);
1045X509_TRUST * X509_TRUST_get0(int idx);
1046int X509_TRUST_get_by_id(int id);
1047int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
1048 const char *name, int arg1, void *arg2);
1049void X509_TRUST_cleanup(void);
1050int X509_TRUST_get_flags(const X509_TRUST *xp);
1051char *X509_TRUST_get0_name(const X509_TRUST *xp);
1052int X509_TRUST_get_trust(const X509_TRUST *xp);
1053 1042
1054int X509_up_ref(X509 *x); 1043int X509_up_ref(X509 *x);
1055STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); 1044STACK_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}
221LCRYPTO_ALIAS(X509_check_trust); 221LCRYPTO_ALIAS(X509_check_trust);
222
223/*
224 * Remove all the functions below in the next bump.
225 */
226
227int
228(*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int)
229{
230 X509error(ERR_R_DISABLED);
231 return NULL;
232}
233LCRYPTO_ALIAS(X509_TRUST_set_default);
234
235int
236X509_TRUST_get_count(void)
237{
238 return X509_TRUST_COUNT;
239}
240LCRYPTO_ALIAS(X509_TRUST_get_count);
241
242X509_TRUST *
243X509_TRUST_get0(int idx)
244{
245 X509error(ERR_R_DISABLED);
246 return NULL;
247}
248LCRYPTO_ALIAS(X509_TRUST_get0);
249
250int
251X509_TRUST_get_by_id(int id)
252{
253 X509error(ERR_R_DISABLED);
254 return -1;
255}
256LCRYPTO_ALIAS(X509_TRUST_get_by_id);
257
258int
259X509_TRUST_set(int *t, int trust)
260{
261 X509error(ERR_R_DISABLED);
262 return 0;
263}
264LCRYPTO_ALIAS(X509_TRUST_set);
265
266int
267X509_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}
273LCRYPTO_ALIAS(X509_TRUST_add);
274
275void
276X509_TRUST_cleanup(void)
277{
278}
279LCRYPTO_ALIAS(X509_TRUST_cleanup);
280
281int
282X509_TRUST_get_flags(const X509_TRUST *xp)
283{
284 return xp->flags;
285}
286LCRYPTO_ALIAS(X509_TRUST_get_flags);
287
288char *
289X509_TRUST_get0_name(const X509_TRUST *xp)
290{
291 return xp->name;
292}
293LCRYPTO_ALIAS(X509_TRUST_get0_name);
294
295int
296X509_TRUST_get_trust(const X509_TRUST *xp)
297{
298 return xp->trust;
299}
300LCRYPTO_ALIAS(X509_TRUST_get_trust);