diff options
Diffstat (limited to 'src/lib/libcrypto/ex_data.c')
-rw-r--r-- | src/lib/libcrypto/ex_data.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ex_data.c b/src/lib/libcrypto/ex_data.c index 0a9c59121f..71b2fc397b 100644 --- a/src/lib/libcrypto/ex_data.c +++ b/src/lib/libcrypto/ex_data.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ex_data.c,v 1.21 2023/06/16 11:20:01 tb Exp $ */ | 1 | /* $OpenBSD: ex_data.c,v 1.22 2023/07/08 08:28:23 beck Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Overhaul notes; | 4 | * Overhaul notes; |
@@ -217,6 +217,7 @@ CRYPTO_get_ex_data_implementation(void) | |||
217 | IMPL_CHECK | 217 | IMPL_CHECK |
218 | return impl; | 218 | return impl; |
219 | } | 219 | } |
220 | LCRYPTO_ALIAS(CRYPTO_get_ex_data_implementation); | ||
220 | 221 | ||
221 | int | 222 | int |
222 | CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i) | 223 | CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i) |
@@ -230,6 +231,7 @@ CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i) | |||
230 | CRYPTO_w_unlock(CRYPTO_LOCK_EX_DATA); | 231 | CRYPTO_w_unlock(CRYPTO_LOCK_EX_DATA); |
231 | return toret; | 232 | return toret; |
232 | } | 233 | } |
234 | LCRYPTO_ALIAS(CRYPTO_set_ex_data_implementation); | ||
233 | 235 | ||
234 | /****************************************************************************/ | 236 | /****************************************************************************/ |
235 | /* Interal (default) implementation of "ex_data" support. API functions are | 237 | /* Interal (default) implementation of "ex_data" support. API functions are |
@@ -547,6 +549,7 @@ CRYPTO_ex_data_new_class(void) | |||
547 | IMPL_CHECK | 549 | IMPL_CHECK |
548 | return EX_IMPL(new_class)(); | 550 | return EX_IMPL(new_class)(); |
549 | } | 551 | } |
552 | LCRYPTO_ALIAS(CRYPTO_ex_data_new_class); | ||
550 | 553 | ||
551 | /* Release all "ex_data" state to prevent memory leaks. This can't be made | 554 | /* Release all "ex_data" state to prevent memory leaks. This can't be made |
552 | * thread-safe without overhauling a lot of stuff, and shouldn't really be | 555 | * thread-safe without overhauling a lot of stuff, and shouldn't really be |
@@ -558,6 +561,7 @@ CRYPTO_cleanup_all_ex_data(void) | |||
558 | IMPL_CHECK | 561 | IMPL_CHECK |
559 | EX_IMPL(cleanup)(); | 562 | EX_IMPL(cleanup)(); |
560 | } | 563 | } |
564 | LCRYPTO_ALIAS(CRYPTO_cleanup_all_ex_data); | ||
561 | 565 | ||
562 | /* Inside an existing class, get/register a new index. */ | 566 | /* Inside an existing class, get/register a new index. */ |
563 | int | 567 | int |
@@ -571,6 +575,7 @@ CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, | |||
571 | argl, argp, new_func, dup_func, free_func); | 575 | argl, argp, new_func, dup_func, free_func); |
572 | return ret; | 576 | return ret; |
573 | } | 577 | } |
578 | LCRYPTO_ALIAS(CRYPTO_get_ex_new_index); | ||
574 | 579 | ||
575 | /* Initialise a new CRYPTO_EX_DATA for use in a particular class - including | 580 | /* Initialise a new CRYPTO_EX_DATA for use in a particular class - including |
576 | * calling new() callbacks for each index in the class used by this variable */ | 581 | * calling new() callbacks for each index in the class used by this variable */ |
@@ -580,6 +585,7 @@ CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad) | |||
580 | IMPL_CHECK | 585 | IMPL_CHECK |
581 | return EX_IMPL(new_ex_data)(class_index, obj, ad); | 586 | return EX_IMPL(new_ex_data)(class_index, obj, ad); |
582 | } | 587 | } |
588 | LCRYPTO_ALIAS(CRYPTO_new_ex_data); | ||
583 | 589 | ||
584 | /* Duplicate a CRYPTO_EX_DATA variable - including calling dup() callbacks for | 590 | /* Duplicate a CRYPTO_EX_DATA variable - including calling dup() callbacks for |
585 | * each index in the class used by this variable */ | 591 | * each index in the class used by this variable */ |
@@ -589,6 +595,7 @@ CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from) | |||
589 | IMPL_CHECK | 595 | IMPL_CHECK |
590 | return EX_IMPL(dup_ex_data)(class_index, to, from); | 596 | return EX_IMPL(dup_ex_data)(class_index, to, from); |
591 | } | 597 | } |
598 | LCRYPTO_ALIAS(CRYPTO_dup_ex_data); | ||
592 | 599 | ||
593 | /* Cleanup a CRYPTO_EX_DATA variable - including calling free() callbacks for | 600 | /* Cleanup a CRYPTO_EX_DATA variable - including calling free() callbacks for |
594 | * each index in the class used by this variable */ | 601 | * each index in the class used by this variable */ |
@@ -598,6 +605,7 @@ CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad) | |||
598 | IMPL_CHECK | 605 | IMPL_CHECK |
599 | EX_IMPL(free_ex_data)(class_index, obj, ad); | 606 | EX_IMPL(free_ex_data)(class_index, obj, ad); |
600 | } | 607 | } |
608 | LCRYPTO_ALIAS(CRYPTO_free_ex_data); | ||
601 | 609 | ||
602 | /* For a given CRYPTO_EX_DATA variable, set the value corresponding to a | 610 | /* For a given CRYPTO_EX_DATA variable, set the value corresponding to a |
603 | * particular index in the class used by this variable */ | 611 | * particular index in the class used by this variable */ |
@@ -624,6 +632,7 @@ CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val) | |||
624 | sk_void_set(ad->sk, idx, val); | 632 | sk_void_set(ad->sk, idx, val); |
625 | return (1); | 633 | return (1); |
626 | } | 634 | } |
635 | LCRYPTO_ALIAS(CRYPTO_set_ex_data); | ||
627 | 636 | ||
628 | /* For a given CRYPTO_EX_DATA_ variable, get the value corresponding to a | 637 | /* For a given CRYPTO_EX_DATA_ variable, get the value corresponding to a |
629 | * particular index in the class used by this variable */ | 638 | * particular index in the class used by this variable */ |
@@ -637,3 +646,4 @@ CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx) | |||
637 | else | 646 | else |
638 | return (sk_void_value(ad->sk, idx)); | 647 | return (sk_void_value(ad->sk, idx)); |
639 | } | 648 | } |
649 | LCRYPTO_ALIAS(CRYPTO_get_ex_data); | ||