Lines Matching defs:obj
136 MYOBJ *obj = OPENSSL_malloc(sizeof(*obj));
138 if (obj != NULL) {
139 obj->id = ++count;
140 obj->st = CRYPTO_new_ex_data(CRYPTO_EX_INDEX_APP, obj, &obj->ex_data);
142 return obj;
145 static void MYOBJ_sethello(MYOBJ *obj, char *cp)
147 obj->st = CRYPTO_set_ex_data(&obj->ex_data, saved_idx, cp);
148 if (!TEST_int_eq(obj->st, 1))
152 static char *MYOBJ_gethello(MYOBJ *obj)
154 return CRYPTO_get_ex_data(&obj->ex_data, saved_idx);
157 static void MYOBJ_sethello2(MYOBJ *obj, char *cp)
159 MYOBJ_EX_DATA* ex_data = CRYPTO_get_ex_data(&obj->ex_data, saved_idx2);
164 obj->st = gbl_result = 0;
167 static char *MYOBJ_gethello2(MYOBJ *obj)
169 MYOBJ_EX_DATA* ex_data = CRYPTO_get_ex_data(&obj->ex_data, saved_idx2);
174 obj->st = gbl_result = 0;
178 static void MYOBJ_allochello3(MYOBJ *obj, char *cp)
182 if (TEST_ptr_null(ex_data = CRYPTO_get_ex_data(&obj->ex_data, saved_idx3))
183 && TEST_true(CRYPTO_alloc_ex_data(CRYPTO_EX_INDEX_APP, obj,
184 &obj->ex_data, saved_idx3))
185 && TEST_ptr(ex_data = CRYPTO_get_ex_data(&obj->ex_data, saved_idx3)))
188 obj->st = gbl_result = 0;
191 static char *MYOBJ_gethello3(MYOBJ *obj)
193 MYOBJ_EX_DATA* ex_data = CRYPTO_get_ex_data(&obj->ex_data, saved_idx3);
198 obj->st = gbl_result = 0;
202 static void MYOBJ_free(MYOBJ *obj)
204 if (obj != NULL) {
205 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_APP, obj, &obj->ex_data);
206 OPENSSL_free(obj);
212 MYOBJ *obj = MYOBJ_new();
214 if (obj != NULL)
215 obj->st |= CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_APP, &obj->ex_data,
217 return obj;