summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects/obj_dat.c
diff options
context:
space:
mode:
authorbeck <>2023-07-08 12:27:51 +0000
committerbeck <>2023-07-08 12:27:51 +0000
commit58b8e86504ee990d53dee75f82e5650298fb8fae (patch)
treefc4a56499fa135830ac3a4de1d3e9df82e09577d /src/lib/libcrypto/objects/obj_dat.c
parent2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82 (diff)
downloadopenbsd-58b8e86504ee990d53dee75f82e5650298fb8fae.tar.gz
openbsd-58b8e86504ee990d53dee75f82e5650298fb8fae.tar.bz2
openbsd-58b8e86504ee990d53dee75f82e5650298fb8fae.zip
Hide symbols in objects
ok tb@
Diffstat (limited to 'src/lib/libcrypto/objects/obj_dat.c')
-rw-r--r--src/lib/libcrypto/objects/obj_dat.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c
index 7516a6d09a..ff06177451 100644
--- a/src/lib/libcrypto/objects/obj_dat.c
+++ b/src/lib/libcrypto/objects/obj_dat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_dat.c,v 1.53 2023/05/23 11:51:12 tb Exp $ */ 1/* $OpenBSD: obj_dat.c,v 1.54 2023/07/08 12:27:51 beck 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 *
@@ -280,6 +280,7 @@ OBJ_cleanup(void)
280 lh_ADDED_OBJ_free(added); 280 lh_ADDED_OBJ_free(added);
281 added = NULL; 281 added = NULL;
282} 282}
283LCRYPTO_ALIAS(OBJ_cleanup);
283 284
284int 285int
285OBJ_new_nid(int num) 286OBJ_new_nid(int num)
@@ -290,6 +291,7 @@ OBJ_new_nid(int num)
290 new_nid += num; 291 new_nid += num;
291 return (i); 292 return (i);
292} 293}
294LCRYPTO_ALIAS(OBJ_new_nid);
293 295
294int 296int
295OBJ_add_object(const ASN1_OBJECT *obj) 297OBJ_add_object(const ASN1_OBJECT *obj)
@@ -338,6 +340,7 @@ OBJ_add_object(const ASN1_OBJECT *obj)
338 ASN1_OBJECT_free(o); 340 ASN1_OBJECT_free(o);
339 return (NID_undef); 341 return (NID_undef);
340} 342}
343LCRYPTO_ALIAS(OBJ_add_object);
341 344
342ASN1_OBJECT * 345ASN1_OBJECT *
343OBJ_nid2obj(int n) 346OBJ_nid2obj(int n)
@@ -366,6 +369,7 @@ OBJ_nid2obj(int n)
366 } 369 }
367 } 370 }
368} 371}
372LCRYPTO_ALIAS(OBJ_nid2obj);
369 373
370const char * 374const char *
371OBJ_nid2sn(int n) 375OBJ_nid2sn(int n)
@@ -394,6 +398,7 @@ OBJ_nid2sn(int n)
394 } 398 }
395 } 399 }
396} 400}
401LCRYPTO_ALIAS(OBJ_nid2sn);
397 402
398const char * 403const char *
399OBJ_nid2ln(int n) 404OBJ_nid2ln(int n)
@@ -422,6 +427,7 @@ OBJ_nid2ln(int n)
422 } 427 }
423 } 428 }
424} 429}
430LCRYPTO_ALIAS(OBJ_nid2ln);
425 431
426static int 432static int
427obj_cmp(const ASN1_OBJECT * const *ap, const unsigned int *bp) 433obj_cmp(const ASN1_OBJECT * const *ap, const unsigned int *bp)
@@ -475,6 +481,7 @@ OBJ_obj2nid(const ASN1_OBJECT *a)
475 return (NID_undef); 481 return (NID_undef);
476 return (nid_objs[*op].nid); 482 return (nid_objs[*op].nid);
477} 483}
484LCRYPTO_ALIAS(OBJ_obj2nid);
478 485
479/* Convert an object name into an ASN1_OBJECT 486/* Convert an object name into an ASN1_OBJECT
480 * if "noname" is not set then search for short and long names first. 487 * if "noname" is not set then search for short and long names first.
@@ -495,12 +502,14 @@ OBJ_txt2obj(const char *s, int no_name)
495 502
496 return t2i_ASN1_OBJECT_internal(s); 503 return t2i_ASN1_OBJECT_internal(s);
497} 504}
505LCRYPTO_ALIAS(OBJ_txt2obj);
498 506
499int 507int
500OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *aobj, int no_name) 508OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *aobj, int no_name)
501{ 509{
502 return i2t_ASN1_OBJECT_internal(aobj, buf, buf_len, no_name); 510 return i2t_ASN1_OBJECT_internal(aobj, buf, buf_len, no_name);
503} 511}
512LCRYPTO_ALIAS(OBJ_obj2txt);
504 513
505int 514int
506OBJ_txt2nid(const char *s) 515OBJ_txt2nid(const char *s)
@@ -513,6 +522,7 @@ OBJ_txt2nid(const char *s)
513 ASN1_OBJECT_free(obj); 522 ASN1_OBJECT_free(obj);
514 return nid; 523 return nid;
515} 524}
525LCRYPTO_ALIAS(OBJ_txt2nid);
516 526
517int 527int
518OBJ_ln2nid(const char *s) 528OBJ_ln2nid(const char *s)
@@ -535,6 +545,7 @@ OBJ_ln2nid(const char *s)
535 return (NID_undef); 545 return (NID_undef);
536 return (nid_objs[*op].nid); 546 return (nid_objs[*op].nid);
537} 547}
548LCRYPTO_ALIAS(OBJ_ln2nid);
538 549
539int 550int
540OBJ_sn2nid(const char *s) 551OBJ_sn2nid(const char *s)
@@ -557,6 +568,7 @@ OBJ_sn2nid(const char *s)
557 return (NID_undef); 568 return (NID_undef);
558 return (nid_objs[*op].nid); 569 return (nid_objs[*op].nid);
559} 570}
571LCRYPTO_ALIAS(OBJ_sn2nid);
560 572
561const void * 573const void *
562OBJ_bsearch_(const void *key, const void *base, int num, int size, 574OBJ_bsearch_(const void *key, const void *base, int num, int size,
@@ -564,6 +576,7 @@ OBJ_bsearch_(const void *key, const void *base, int num, int size,
564{ 576{
565 return OBJ_bsearch_ex_(key, base, num, size, cmp, 0); 577 return OBJ_bsearch_ex_(key, base, num, size, cmp, 0);
566} 578}
579LCRYPTO_ALIAS(OBJ_bsearch_);
567 580
568const void * 581const void *
569OBJ_bsearch_ex_(const void *key, const void *base_, int num, int size, 582OBJ_bsearch_ex_(const void *key, const void *base_, int num, int size,
@@ -646,6 +659,7 @@ OBJ_create_objects(BIO *in)
646 } 659 }
647 /* return(num); */ 660 /* return(num); */
648} 661}
662LCRYPTO_ALIAS(OBJ_create_objects);
649 663
650int 664int
651OBJ_create(const char *oid, const char *sn, const char *ln) 665OBJ_create(const char *oid, const char *sn, const char *ln)
@@ -676,6 +690,7 @@ OBJ_create(const char *oid, const char *sn, const char *ln)
676 free(buf); 690 free(buf);
677 return (ok); 691 return (ok);
678} 692}
693LCRYPTO_ALIAS(OBJ_create);
679 694
680size_t 695size_t
681OBJ_length(const ASN1_OBJECT *obj) 696OBJ_length(const ASN1_OBJECT *obj)
@@ -688,6 +703,7 @@ OBJ_length(const ASN1_OBJECT *obj)
688 703
689 return obj->length; 704 return obj->length;
690} 705}
706LCRYPTO_ALIAS(OBJ_length);
691 707
692const unsigned char * 708const unsigned char *
693OBJ_get0_data(const ASN1_OBJECT *obj) 709OBJ_get0_data(const ASN1_OBJECT *obj)
@@ -697,3 +713,4 @@ OBJ_get0_data(const ASN1_OBJECT *obj)
697 713
698 return obj->data; 714 return obj->data;
699} 715}
716LCRYPTO_ALIAS(OBJ_get0_data);