Lines Matching refs:pval
28 static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
47 static int asn1_template_ex_d2i(ASN1_VALUE **pval,
57 static int asn1_d2i_ex_primitive(ASN1_VALUE **pval,
62 static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
107 static int asn1_item_ex_d2i_intern(ASN1_VALUE **pval, const unsigned char **in, in asn1_item_ex_d2i_intern() argument
114 if (pval == NULL || it == NULL) { in asn1_item_ex_d2i_intern()
118 rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0, in asn1_item_ex_d2i_intern()
121 ASN1_item_ex_free(pval, it); in asn1_item_ex_d2i_intern()
125 int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, in ASN1_item_ex_d2i() argument
129 return asn1_item_ex_d2i_intern(pval, in, len, it, tag, aclass, opt, ctx, in ASN1_item_ex_d2i()
133 ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **pval, in ASN1_item_d2i_ex() argument
141 if (pval == NULL) in ASN1_item_d2i_ex()
142 pval = &ptmpval; in ASN1_item_d2i_ex()
144 if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx, in ASN1_item_d2i_ex()
146 return *pval; in ASN1_item_d2i_ex()
150 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **pval, in ASN1_item_d2i() argument
154 return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL); in ASN1_item_d2i()
162 static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in, in asn1_item_embed_d2i() argument
181 if (pval == NULL || it == NULL) { in asn1_item_embed_d2i()
214 return asn1_template_ex_d2i(pval, in, len, it->templates, opt, ctx, in asn1_item_embed_d2i()
217 return asn1_d2i_ex_primitive(pval, in, len, it, in asn1_item_embed_d2i()
256 return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0, ctx); in asn1_item_embed_d2i()
262 return ef->asn1_ex_d2i_ex(pval, in, len, it, tag, aclass, opt, ctx, in asn1_item_embed_d2i()
264 return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx); in asn1_item_embed_d2i()
276 if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) in asn1_item_embed_d2i()
278 if (*pval) { in asn1_item_embed_d2i()
280 i = ossl_asn1_get_choice_selector(pval, it); in asn1_item_embed_d2i()
283 pchptr = ossl_asn1_get_field_ptr(pval, tt); in asn1_item_embed_d2i()
285 ossl_asn1_set_choice_selector(pval, -1, it); in asn1_item_embed_d2i()
287 } else if (!ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) { in asn1_item_embed_d2i()
294 pchptr = ossl_asn1_get_field_ptr(pval, tt); in asn1_item_embed_d2i()
321 ASN1_item_ex_free(pval, it); in asn1_item_embed_d2i()
328 ossl_asn1_set_choice_selector(pval, i, it); in asn1_item_embed_d2i()
330 if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL)) in asn1_item_embed_d2i()
365 if (*pval == NULL in asn1_item_embed_d2i()
366 && !ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) { in asn1_item_embed_d2i()
371 if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) in asn1_item_embed_d2i()
379 seqtt = ossl_asn1_do_adb(*pval, tt, 0); in asn1_item_embed_d2i()
382 pseqval = ossl_asn1_get_field_ptr(pval, seqtt); in asn1_item_embed_d2i()
391 seqtt = ossl_asn1_do_adb(*pval, tt, 1); in asn1_item_embed_d2i()
394 pseqval = ossl_asn1_get_field_ptr(pval, seqtt); in asn1_item_embed_d2i()
456 seqtt = ossl_asn1_do_adb(*pval, tt, 1); in asn1_item_embed_d2i()
461 pseqval = ossl_asn1_get_field_ptr(pval, seqtt); in asn1_item_embed_d2i()
470 if (!ossl_asn1_enc_save(pval, *in, p - *in, it)) in asn1_item_embed_d2i()
472 if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL)) in asn1_item_embed_d2i()
698 static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, in asn1_d2i_ex_primitive() argument
711 if (pval == NULL) { in asn1_d2i_ex_primitive()
818 if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it)) in asn1_d2i_ex_primitive()
831 static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, in asn1_ex_c2i() argument
843 return pf->prim_c2i(pval, cont, len, utype, free_cont, it); in asn1_ex_c2i()
846 if (*pval == NULL) { in asn1_ex_c2i()
850 *pval = (ASN1_VALUE *)typ; in asn1_ex_c2i()
852 typ = (ASN1_TYPE *)*pval; in asn1_ex_c2i()
856 opval = pval; in asn1_ex_c2i()
857 pval = &typ->value.asn1_value; in asn1_ex_c2i()
861 if (!ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len)) in asn1_ex_c2i()
870 *pval = (ASN1_VALUE *)1; in asn1_ex_c2i()
879 tbool = (ASN1_BOOLEAN *)pval; in asn1_ex_c2i()
885 if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len)) in asn1_ex_c2i()
891 tint = (ASN1_INTEGER **)pval; in asn1_ex_c2i()
933 if (*pval == NULL) { in asn1_ex_c2i()
939 *pval = (ASN1_VALUE *)stmp; in asn1_ex_c2i()
941 stmp = (ASN1_STRING *)*pval; in asn1_ex_c2i()
952 *pval = NULL; in asn1_ex_c2i()