Lines Matching refs:len

29                                long len, const ASN1_ITEM *it,
34 static int asn1_check_eoc(const unsigned char **in, long len);
35 static int asn1_find_end(const unsigned char **in, long len, char inf);
37 static int asn1_collect(BUF_MEM *buf, const unsigned char **in, long len,
44 const unsigned char **in, long len,
48 const unsigned char **in, long len,
53 const unsigned char **in, long len,
58 const unsigned char **in, long len,
62 static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
108 long len, const ASN1_ITEM *it, int tag, in asn1_item_ex_d2i_intern() argument
118 rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0, 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()
134 const unsigned char **in, long len, in ASN1_item_d2i_ex() argument
144 if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx, in ASN1_item_d2i_ex()
151 const unsigned char **in, long len, in ASN1_item_d2i() argument
154 return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL); in ASN1_item_d2i()
163 long len, const ASN1_ITEM *it, in asn1_item_embed_d2i() argument
185 if (len <= 0) { 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()
233 &p, len, -1, 0, 1, ctx); 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()
298 ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, ctx, depth, in asn1_item_embed_d2i()
338 tmplen = len; in asn1_item_embed_d2i()
346 ret = asn1_check_tlen(&len, NULL, NULL, &seq_eoc, &cst, in asn1_item_embed_d2i()
347 &p, len, tag, aclass, opt, ctx); in asn1_item_embed_d2i()
354 len = tmplen - (p - *in); in asn1_item_embed_d2i()
396 if (!len) in asn1_item_embed_d2i()
399 if (asn1_check_eoc(&p, len)) { in asn1_item_embed_d2i()
404 len -= p - q; in asn1_item_embed_d2i()
422 ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx, in asn1_item_embed_d2i()
435 len -= p - q; in asn1_item_embed_d2i()
439 if (seq_eoc && !asn1_check_eoc(&p, len)) { in asn1_item_embed_d2i()
444 if (!seq_nolen && len) { in asn1_item_embed_d2i()
504 long len; in asn1_template_ex_d2i() local
521 ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst, in asn1_template_ex_d2i()
534 ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth, libctx, in asn1_template_ex_d2i()
541 len -= p - q; in asn1_template_ex_d2i()
544 if (!asn1_check_eoc(&p, len)) { in asn1_template_ex_d2i()
552 if (len) { in asn1_template_ex_d2i()
569 const unsigned char **in, long len, in asn1_template_noexp_d2i() argument
610 ret = asn1_check_tlen(&len, NULL, NULL, &sk_eoc, NULL, in asn1_template_noexp_d2i()
611 &p, len, sktag, skaclass, opt, ctx); in asn1_template_noexp_d2i()
637 while (len > 0) { in asn1_template_noexp_d2i()
641 if (asn1_check_eoc(&p, len)) { in asn1_template_noexp_d2i()
646 len -= p - q; in asn1_template_noexp_d2i()
651 if (asn1_item_embed_d2i(&skfield, &p, len, in asn1_template_noexp_d2i()
659 len -= p - q; in asn1_template_noexp_d2i()
672 ret = asn1_item_embed_d2i(val, &p, len, in asn1_template_noexp_d2i()
682 ret = asn1_item_embed_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), in asn1_template_noexp_d2i()
709 long len; in asn1_d2i_ex_primitive() local
778 len = p - cont; in asn1_d2i_ex_primitive()
780 len = p - cont + plen; in asn1_d2i_ex_primitive()
802 len = buf.length; in asn1_d2i_ex_primitive()
804 if (!BUF_MEM_grow_clean(&buf, len + 1)) { in asn1_d2i_ex_primitive()
808 buf.data[len] = 0; in asn1_d2i_ex_primitive()
812 len = plen; 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()
861 if (!ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len)) in asn1_ex_c2i()
866 if (len) { in asn1_ex_c2i()
874 if (len != 1) { in asn1_ex_c2i()
885 if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len)) in asn1_ex_c2i()
892 if (!ossl_c2i_ASN1_INTEGER(tint, &cont, len)) in asn1_ex_c2i()
916 if (utype == V_ASN1_BMPSTRING && (len & 1)) { in asn1_ex_c2i()
920 if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) { in asn1_ex_c2i()
924 if (utype == V_ASN1_GENERALIZEDTIME && (len < 15)) { in asn1_ex_c2i()
928 if (utype == V_ASN1_UTCTIME && (len < 13)) { in asn1_ex_c2i()
946 ASN1_STRING_set0(stmp, (unsigned char *)cont /* UGLY CAST! */, len); in asn1_ex_c2i()
949 if (!ASN1_STRING_set(stmp, cont, len)) { in asn1_ex_c2i()
979 static int asn1_find_end(const unsigned char **in, long len, char inf) in asn1_find_end() argument
986 *in += len; in asn1_find_end()
996 while (len > 0) { in asn1_find_end()
997 if (asn1_check_eoc(&p, len)) { in asn1_find_end()
1001 len -= 2; in asn1_find_end()
1006 if (!asn1_check_tlen(&plen, NULL, NULL, &inf, NULL, &p, len, in asn1_find_end()
1020 len -= p - q; in asn1_find_end()
1046 static int asn1_collect(BUF_MEM *buf, const unsigned char **in, long len, in asn1_collect() argument
1059 *in += len; in asn1_collect()
1062 while (len > 0) { in asn1_collect()
1065 if (asn1_check_eoc(&p, len)) { in asn1_collect()
1078 len, tag, aclass, 0, NULL)) { in asn1_collect()
1093 len -= p - q; in asn1_collect()
1105 int len; in collect_data() local
1107 len = buf->length; in collect_data()
1108 if (!BUF_MEM_grow_clean(buf, len + plen)) { in collect_data()
1112 memcpy(buf->data + len, *p, plen); in collect_data()
1120 static int asn1_check_eoc(const unsigned char **in, long len) in asn1_check_eoc() argument
1124 if (len < 2) in asn1_check_eoc()
1143 const unsigned char **in, long len, in asn1_check_tlen() argument
1153 if (len <= 0) { in asn1_check_tlen()
1164 i = ASN1_get_object(&p, &plen, &ptag, &pclass, len); in asn1_check_tlen()
1176 if ((i & 0x81) == 0 && (plen + ctx->hdrlen) > len) { in asn1_check_tlen()
1205 plen = len - (p - q); in asn1_check_tlen()