• Home
  • Raw
  • Download

Lines Matching refs:it

70 static int asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
72 static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it);
74 static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it);
76 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it) in ASN1_item_new() argument
79 if (ASN1_item_ex_new(&ret, it) > 0) in ASN1_item_new()
86 int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it) in ASN1_item_ex_new() argument
88 return asn1_item_ex_combine_new(pval, it, 0); in ASN1_item_ex_new()
91 static int asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, in asn1_item_ex_combine_new() argument
97 const ASN1_AUX *aux = it->funcs; in asn1_item_ex_combine_new()
107 if (it->sname) in asn1_item_ex_combine_new()
108 CRYPTO_push_info(it->sname); in asn1_item_ex_combine_new()
111 switch (it->itype) { in asn1_item_ex_combine_new()
114 ef = it->funcs; in asn1_item_ex_combine_new()
116 if (!ef->asn1_ex_new(pval, it)) in asn1_item_ex_combine_new()
122 cf = it->funcs; in asn1_item_ex_combine_new()
131 if (it->templates) { in asn1_item_ex_combine_new()
132 if (!ASN1_template_new(pval, it->templates)) in asn1_item_ex_combine_new()
134 } else if (!ASN1_primitive_new(pval, it)) in asn1_item_ex_combine_new()
139 if (!ASN1_primitive_new(pval, it)) in asn1_item_ex_combine_new()
145 i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL); in asn1_item_ex_combine_new()
150 if (it->sname) in asn1_item_ex_combine_new()
157 *pval = OPENSSL_malloc(it->size); in asn1_item_ex_combine_new()
160 OPENSSL_memset(*pval, 0, it->size); in asn1_item_ex_combine_new()
162 asn1_set_choice_selector(pval, -1, it); in asn1_item_ex_combine_new()
163 if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) in asn1_item_ex_combine_new()
170 i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL); in asn1_item_ex_combine_new()
175 if (it->sname) in asn1_item_ex_combine_new()
182 *pval = OPENSSL_malloc(it->size); in asn1_item_ex_combine_new()
185 OPENSSL_memset(*pval, 0, it->size); in asn1_item_ex_combine_new()
186 asn1_refcount_set_one(pval, it); in asn1_item_ex_combine_new()
187 asn1_enc_init(pval, it); in asn1_item_ex_combine_new()
189 for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) { in asn1_item_ex_combine_new()
194 if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) in asn1_item_ex_combine_new()
199 if (it->sname) in asn1_item_ex_combine_new()
205 asn1_item_combine_free(pval, it, combine); in asn1_item_ex_combine_new()
209 if (it->sname) in asn1_item_ex_combine_new()
215 asn1_item_combine_free(pval, it, combine); in asn1_item_ex_combine_new()
219 if (it->sname) in asn1_item_ex_combine_new()
226 static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) in asn1_item_clear() argument
230 switch (it->itype) { in asn1_item_clear()
233 ef = it->funcs; in asn1_item_clear()
235 ef->asn1_ex_clear(pval, it); in asn1_item_clear()
241 if (it->templates) in asn1_item_clear()
242 asn1_template_clear(pval, it->templates); in asn1_item_clear()
244 asn1_primitive_clear(pval, it); in asn1_item_clear()
248 asn1_primitive_clear(pval, it); in asn1_item_clear()
262 const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item); in ASN1_template_new() local
292 ret = asn1_item_ex_combine_new(pval, it, tt->flags & ASN1_TFLG_COMBINE); in ASN1_template_new()
295 if (it->sname) in ASN1_template_new()
315 int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it) in ASN1_primitive_new() argument
321 if (!it) in ASN1_primitive_new()
324 if (it->funcs) { in ASN1_primitive_new()
325 const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; in ASN1_primitive_new()
327 return pf->prim_new(pval, it); in ASN1_primitive_new()
330 if (it->itype == ASN1_ITYPE_MSTRING) in ASN1_primitive_new()
333 utype = it->utype; in ASN1_primitive_new()
340 *(ASN1_BOOLEAN *)pval = it->size; in ASN1_primitive_new()
358 if (it->itype == ASN1_ITYPE_MSTRING && str) in ASN1_primitive_new()
368 static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) in asn1_primitive_clear() argument
371 if (it && it->funcs) { in asn1_primitive_clear()
372 const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; in asn1_primitive_clear()
374 pf->prim_clear(pval, it); in asn1_primitive_clear()
379 if (!it || (it->itype == ASN1_ITYPE_MSTRING)) in asn1_primitive_clear()
382 utype = it->utype; in asn1_primitive_clear()
384 *(ASN1_BOOLEAN *)pval = it->size; in asn1_primitive_clear()