Lines Matching refs:pval

18 static int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
21 static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
23 static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it);
24 static int asn1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt,
26 static void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
27 static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it);
49 int ossl_asn1_item_ex_new_intern(ASN1_VALUE **pval, const ASN1_ITEM *it, in ossl_asn1_item_ex_new_intern() argument
52 return asn1_item_embed_new(pval, it, 0, libctx, propq); in ossl_asn1_item_ex_new_intern()
55 int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it) in ASN1_item_ex_new() argument
57 return asn1_item_embed_new(pval, it, 0, NULL, NULL); in ASN1_item_ex_new()
60 int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed, in asn1_item_embed_new() argument
80 if (!ef->asn1_ex_new_ex(pval, it, libctx, propq)) in asn1_item_embed_new()
83 if (!ef->asn1_ex_new(pval, it)) in asn1_item_embed_new()
91 if (!asn1_template_new(pval, it->templates, libctx, propq)) in asn1_item_embed_new()
93 } else if (!asn1_primitive_new(pval, it, embed)) in asn1_item_embed_new()
98 if (!asn1_primitive_new(pval, it, embed)) in asn1_item_embed_new()
104 i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL); in asn1_item_embed_new()
112 memset(*pval, 0, it->size); in asn1_item_embed_new()
114 *pval = OPENSSL_zalloc(it->size); in asn1_item_embed_new()
115 if (*pval == NULL) in asn1_item_embed_new()
118 ossl_asn1_set_choice_selector(pval, -1, it); in asn1_item_embed_new()
119 if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) in asn1_item_embed_new()
126 i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL); in asn1_item_embed_new()
134 memset(*pval, 0, it->size); in asn1_item_embed_new()
136 *pval = OPENSSL_zalloc(it->size); in asn1_item_embed_new()
137 if (*pval == NULL) in asn1_item_embed_new()
141 if (ossl_asn1_do_lock(pval, 0, it) < 0) { in asn1_item_embed_new()
143 OPENSSL_free(*pval); in asn1_item_embed_new()
144 *pval = NULL; in asn1_item_embed_new()
148 ossl_asn1_enc_init(pval, it); in asn1_item_embed_new()
150 pseqval = ossl_asn1_get_field_ptr(pval, tt); in asn1_item_embed_new()
154 if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL)) in asn1_item_embed_new()
161 ossl_asn1_item_embed_free(pval, it, embed); in asn1_item_embed_new()
167 ossl_asn1_item_embed_free(pval, it, embed); in asn1_item_embed_new()
174 static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) in asn1_item_clear() argument
183 ef->asn1_ex_clear(pval, it); in asn1_item_clear()
185 *pval = NULL; in asn1_item_clear()
190 asn1_template_clear(pval, it->templates); in asn1_item_clear()
192 asn1_primitive_clear(pval, it); in asn1_item_clear()
196 asn1_primitive_clear(pval, it); in asn1_item_clear()
202 *pval = NULL; in asn1_item_clear()
207 static int asn1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, in asn1_template_new() argument
215 tval = (ASN1_VALUE *)pval; in asn1_template_new()
216 pval = &tval; in asn1_template_new()
219 asn1_template_clear(pval, tt); in asn1_template_new()
225 *pval = NULL; in asn1_template_new()
237 *pval = (ASN1_VALUE *)skval; in asn1_template_new()
242 ret = asn1_item_embed_new(pval, it, embed, libctx, propq); in asn1_template_new()
247 static void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) in asn1_template_clear() argument
251 *pval = NULL; in asn1_template_clear()
253 asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item)); in asn1_template_clear()
261 static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it, in asn1_primitive_new() argument
275 pf->prim_clear(pval, it); in asn1_primitive_new()
279 return pf->prim_new(pval, it); in asn1_primitive_new()
289 *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef); in asn1_primitive_new()
293 *(ASN1_BOOLEAN *)pval = it->size; in asn1_primitive_new()
297 *pval = (ASN1_VALUE *)1; in asn1_primitive_new()
305 *pval = (ASN1_VALUE *)typ; in asn1_primitive_new()
310 str = *(ASN1_STRING **)pval; in asn1_primitive_new()
316 *pval = (ASN1_VALUE *)str; in asn1_primitive_new()
322 if (*pval) in asn1_primitive_new()
327 static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) in asn1_primitive_clear() argument
333 pf->prim_clear(pval, it); in asn1_primitive_clear()
335 *pval = NULL; in asn1_primitive_clear()
343 *(ASN1_BOOLEAN *)pval = it->size; in asn1_primitive_clear()
345 *pval = NULL; in asn1_primitive_clear()