Lines Matching refs:ad
96 static void dummy_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, in dummy_new() argument
101 static void dummy_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, in dummy_free() argument
220 CRYPTO_EX_DATA *ad) in ossl_crypto_new_ex_data_ex() argument
236 ad->ctx = ctx; in ossl_crypto_new_ex_data_ex()
237 ad->sk = NULL; in ossl_crypto_new_ex_data_ex()
254 ptr = CRYPTO_get_ex_data(ad, i); in ossl_crypto_new_ex_data_ex()
255 storage[i]->new_func(obj, ptr, ad, i, in ossl_crypto_new_ex_data_ex()
264 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad) in CRYPTO_new_ex_data() argument
266 return ossl_crypto_new_ex_data_ex(NULL, class_index, obj, ad); in CRYPTO_new_ex_data()
367 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad) in CRYPTO_free_ex_data() argument
375 OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ad->ctx); in CRYPTO_free_ex_data()
405 ptr = CRYPTO_get_ex_data(ad, storage[i].index); in CRYPTO_free_ex_data()
406 f->free_func(obj, ptr, ad, storage[i].index, f->argl, f->argp); in CRYPTO_free_ex_data()
414 sk_void_free(ad->sk); in CRYPTO_free_ex_data()
415 ad->sk = NULL; in CRYPTO_free_ex_data()
416 ad->ctx = NULL; in CRYPTO_free_ex_data()
423 int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad, in CRYPTO_alloc_ex_data() argument
428 curval = CRYPTO_get_ex_data(ad, idx); in CRYPTO_alloc_ex_data()
433 return ossl_crypto_alloc_ex_data_intern(class_index, obj, ad, idx); in CRYPTO_alloc_ex_data()
437 CRYPTO_EX_DATA *ad, int idx) in ossl_crypto_alloc_ex_data_intern() argument
443 global = ossl_lib_ctx_get_ex_data_global(ad->ctx); in ossl_crypto_alloc_ex_data_intern()
460 f->new_func(obj, NULL, ad, idx, f->argl, f->argp); in ossl_crypto_alloc_ex_data_intern()
469 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val) in CRYPTO_set_ex_data() argument
473 if (ad->sk == NULL) { in CRYPTO_set_ex_data()
474 if ((ad->sk = sk_void_new_null()) == NULL) { in CRYPTO_set_ex_data()
480 for (i = sk_void_num(ad->sk); i <= idx; ++i) { in CRYPTO_set_ex_data()
481 if (!sk_void_push(ad->sk, NULL)) { in CRYPTO_set_ex_data()
486 if (sk_void_set(ad->sk, idx, val) != val) { in CRYPTO_set_ex_data()
498 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx) in CRYPTO_get_ex_data() argument
500 if (ad->sk == NULL || idx >= sk_void_num(ad->sk)) in CRYPTO_get_ex_data()
502 return sk_void_value(ad->sk, idx); in CRYPTO_get_ex_data()
505 OSSL_LIB_CTX *ossl_crypto_ex_data_get_ossl_lib_ctx(const CRYPTO_EX_DATA *ad) in ossl_crypto_ex_data_get_ossl_lib_ctx() argument
507 return ad->ctx; in ossl_crypto_ex_data_get_ossl_lib_ctx()