Lines Matching refs:len
187 size_t len; in getlength() local
214 len = 0; in getlength()
216 len = (len << 8) | c[(*p)++]; in getlength()
218 if (len > UINT32_MAX - *p || *p + len > l) { in getlength()
220 __func__, *p, len, l)); in getlength()
223 return CAST(uint32_t, len); in getlength()
227 der_tag(char *buf, size_t len, uint32_t tag) in der_tag() argument
230 strlcpy(buf, der__tag[tag], len); in der_tag()
232 snprintf(buf, len, "%#x", tag); in der_tag()
238 der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len) in der_data() argument
245 return snprintf(buf, blen, "%.*s", len, RCAST(const char *, q)); in der_data()
247 if (len < 12) in der_data()
256 for (uint32_t i = 0; i < len; i++) { in der_data()
261 return len * 2; in der_data()
268 size_t offs = 0, len = ms->search.s_len ? ms->search.s_len : nbytes; in der_offs() local
270 if (gettag(b, &offs, len) == DER_BAD) { in der_offs()
277 uint32_t tlen = getlength(b, &offs, len); in der_offs()
307 size_t offs = 0, len = ms->search.s_len; in der_cmp() local
311 DPRINTF(("%s: compare %zu bytes\n", __func__, len)); in der_cmp()
313 tag = gettag(b, &offs, len); in der_cmp()
322 tlen = getlength(b, &offs, len); in der_cmp()
376 printtag(uint32_t tag, const void *q, uint32_t len) in printtag() argument
384 printf("%.*s\n", len, (const char *)q); in printtag()
390 for (uint32_t i = 0; i < len; i++) in printtag()
412 uint32_t len = getlength(p, &x, ep - p + x); in printdata() local
417 der_tag(buf, sizeof(buf), tag), len); in printdata()
419 if (p + len > ep) in printdata()
421 printtag(tag, q, len); in printdata()
423 printdata(level + 1, p, x, len + x); in printdata()
424 x += len; in printdata()