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