diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_trs.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 13 |
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 | } |
112 | LCRYPTO_ALIAS(X509_TRUST_set_default) | ||
112 | 113 | ||
113 | static int | 114 | static int |
114 | X509_check_trust_internal(X509 *x, int id, int flags, int compat) | 115 | X509_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 | } |
144 | LCRYPTO_ALIAS(X509_check_trust) | ||
143 | 145 | ||
144 | int | 146 | int |
145 | X509_check_trust(X509 *x, int id, int flags) | 147 | X509_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 | } |
165 | LCRYPTO_ALIAS(X509_TRUST_get_count) | ||
163 | 166 | ||
164 | X509_TRUST * | 167 | X509_TRUST * |
165 | X509_TRUST_get0(int idx) | 168 | X509_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 | } |
176 | LCRYPTO_ALIAS(X509_TRUST_get0) | ||
173 | 177 | ||
174 | int | 178 | int |
175 | X509_TRUST_get_by_id(int id) | 179 | X509_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 | } |
194 | LCRYPTO_ALIAS(X509_TRUST_get_by_id) | ||
190 | 195 | ||
191 | int | 196 | int |
192 | X509_TRUST_set(int *t, int trust) | 197 | X509_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 | } |
206 | LCRYPTO_ALIAS(X509_TRUST_set) | ||
201 | 207 | ||
202 | int | 208 | int |
203 | X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | 209 | X509_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 | } |
272 | LCRYPTO_ALIAS(X509_TRUST_add) | ||
266 | 273 | ||
267 | static void | 274 | static void |
268 | trtable_free(X509_TRUST *p) | 275 | trtable_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 | } |
292 | LCRYPTO_ALIAS(X509_TRUST_cleanup) | ||
285 | 293 | ||
286 | int | 294 | int |
287 | X509_TRUST_get_flags(const X509_TRUST *xp) | 295 | X509_TRUST_get_flags(const X509_TRUST *xp) |
288 | { | 296 | { |
289 | return xp->flags; | 297 | return xp->flags; |
290 | } | 298 | } |
299 | LCRYPTO_ALIAS(X509_TRUST_get_flags) | ||
291 | 300 | ||
292 | char * | 301 | char * |
293 | X509_TRUST_get0_name(const X509_TRUST *xp) | 302 | X509_TRUST_get0_name(const X509_TRUST *xp) |
294 | { | 303 | { |
295 | return xp->name; | 304 | return xp->name; |
296 | } | 305 | } |
306 | LCRYPTO_ALIAS(X509_TRUST_get0_name) | ||
297 | 307 | ||
298 | int | 308 | int |
299 | X509_TRUST_get_trust(const X509_TRUST *xp) | 309 | X509_TRUST_get_trust(const X509_TRUST *xp) |
300 | { | 310 | { |
301 | return xp->trust; | 311 | return xp->trust; |
302 | } | 312 | } |
313 | LCRYPTO_ALIAS(X509_TRUST_get_trust) | ||
303 | 314 | ||
304 | static int | 315 | static int |
305 | trust_1oidany(X509_TRUST *trust, X509 *x, int flags) | 316 | trust_1oidany(X509_TRUST *trust, X509 *x, int flags) |