summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_trs.c
diff options
context:
space:
mode:
authorbeck <>2022-11-14 17:48:50 +0000
committerbeck <>2022-11-14 17:48:50 +0000
commit109899f1b36632f5f1c469c4f562df69585eb21e (patch)
treec42f727f8848b4a56e738422f26e8b44150174e4 /src/lib/libcrypto/x509/x509_trs.c
parentfd2db7678bc81cd8abe106c7bd1c724c8b01888d (diff)
downloadopenbsd-109899f1b36632f5f1c469c4f562df69585eb21e.tar.gz
openbsd-109899f1b36632f5f1c469c4f562df69585eb21e.tar.bz2
openbsd-109899f1b36632f5f1c469c4f562df69585eb21e.zip
Hide public symbols in libcrypto/x509 .c files
ok tb@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_trs.c')
-rw-r--r--src/lib/libcrypto/x509/x509_trs.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c
index 23eca4927b..b075d1b6c8 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.27 2022/11/13 18:37:32 beck Exp $ */ 1/* $OpenBSD: x509_trs.c,v 1.28 2022/11/14 17:48:50 beck 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 */
@@ -109,6 +109,7 @@ int
109 default_trust = trust; 109 default_trust = trust;
110 return oldtrust; 110 return oldtrust;
111} 111}
112LCRYPTO_ALIAS(X509_TRUST_set_default)
112 113
113static int 114static int
114X509_check_trust_internal(X509 *x, int id, int flags, int compat) 115X509_check_trust_internal(X509 *x, int id, int flags, int compat)
@@ -140,6 +141,7 @@ X509_check_trust_internal(X509 *x, int id, int flags, int compat)
140 pt = X509_TRUST_get0(idx); 141 pt = X509_TRUST_get0(idx);
141 return pt->check_trust(pt, x, flags); 142 return pt->check_trust(pt, x, flags);
142} 143}
144LCRYPTO_ALIAS(X509_check_trust)
143 145
144int 146int
145X509_check_trust(X509 *x, int id, int flags) 147X509_check_trust(X509 *x, int id, int flags)
@@ -160,6 +162,7 @@ X509_TRUST_get_count(void)
160 return X509_TRUST_COUNT; 162 return X509_TRUST_COUNT;
161 return sk_X509_TRUST_num(trtable) + X509_TRUST_COUNT; 163 return sk_X509_TRUST_num(trtable) + X509_TRUST_COUNT;
162} 164}
165LCRYPTO_ALIAS(X509_TRUST_get_count)
163 166
164X509_TRUST * 167X509_TRUST *
165X509_TRUST_get0(int idx) 168X509_TRUST_get0(int idx)
@@ -170,6 +173,7 @@ X509_TRUST_get0(int idx)
170 return trstandard + idx; 173 return trstandard + idx;
171 return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT); 174 return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT);
172} 175}
176LCRYPTO_ALIAS(X509_TRUST_get0)
173 177
174int 178int
175X509_TRUST_get_by_id(int id) 179X509_TRUST_get_by_id(int id)
@@ -187,6 +191,7 @@ X509_TRUST_get_by_id(int id)
187 return -1; 191 return -1;
188 return idx + X509_TRUST_COUNT; 192 return idx + X509_TRUST_COUNT;
189} 193}
194LCRYPTO_ALIAS(X509_TRUST_get_by_id)
190 195
191int 196int
192X509_TRUST_set(int *t, int trust) 197X509_TRUST_set(int *t, int trust)
@@ -198,6 +203,7 @@ X509_TRUST_set(int *t, int trust)
198 *t = trust; 203 *t = trust;
199 return 1; 204 return 1;
200} 205}
206LCRYPTO_ALIAS(X509_TRUST_set)
201 207
202int 208int
203X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), 209X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
@@ -263,6 +269,7 @@ err:
263 X509error(ERR_R_MALLOC_FAILURE); 269 X509error(ERR_R_MALLOC_FAILURE);
264 return 0; 270 return 0;
265} 271}
272LCRYPTO_ALIAS(X509_TRUST_add)
266 273
267static void 274static void
268trtable_free(X509_TRUST *p) 275trtable_free(X509_TRUST *p)
@@ -282,24 +289,28 @@ X509_TRUST_cleanup(void)
282 sk_X509_TRUST_pop_free(trtable, trtable_free); 289 sk_X509_TRUST_pop_free(trtable, trtable_free);
283 trtable = NULL; 290 trtable = NULL;
284} 291}
292LCRYPTO_ALIAS(X509_TRUST_cleanup)
285 293
286int 294int
287X509_TRUST_get_flags(const X509_TRUST *xp) 295X509_TRUST_get_flags(const X509_TRUST *xp)
288{ 296{
289 return xp->flags; 297 return xp->flags;
290} 298}
299LCRYPTO_ALIAS(X509_TRUST_get_flags)
291 300
292char * 301char *
293X509_TRUST_get0_name(const X509_TRUST *xp) 302X509_TRUST_get0_name(const X509_TRUST *xp)
294{ 303{
295 return xp->name; 304 return xp->name;
296} 305}
306LCRYPTO_ALIAS(X509_TRUST_get0_name)
297 307
298int 308int
299X509_TRUST_get_trust(const X509_TRUST *xp) 309X509_TRUST_get_trust(const X509_TRUST *xp)
300{ 310{
301 return xp->trust; 311 return xp->trust;
302} 312}
313LCRYPTO_ALIAS(X509_TRUST_get_trust)
303 314
304static int 315static int
305trust_1oidany(X509_TRUST *trust, X509 *x, int flags) 316trust_1oidany(X509_TRUST *trust, X509 *x, int flags)