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
246 return snprintf(buf, blen, "%.*s", len, RCAST(const char *, q)); in der_data()
248 if (len < 12) in der_data()
257 for (i = 0; i < len; i++) { in der_data()
262 return len * 2; in der_data()
269 size_t offs = 0, len = ms->search.s_len ? ms->search.s_len : nbytes; in der_offs() local
271 if (gettag(b, &offs, len) == DER_BAD) { in der_offs()
278 uint32_t tlen = getlength(b, &offs, len); in der_offs()
309 size_t offs = 0, len = ms->search.s_len; in der_cmp() local
313 DPRINTF(("%s: compare %zu bytes\n", __func__, len)); in der_cmp()
315 tag = gettag(b, &offs, len); in der_cmp()
324 tlen = getlength(b, &offs, len); in der_cmp()
388 printtag(uint32_t tag, const void *q, uint32_t len) in printtag() argument
396 printf("%.*s\n", len, (const char *)q); in printtag()
402 for (uint32_t i = 0; i < len; i++) in printtag()
424 uint32_t len = getlength(p, &x, ep - p + x); in printdata() local
429 der_tag(buf, sizeof(buf), tag), len); in printdata()
431 if (p + len > ep) in printdata()
433 printtag(tag, q, len); in printdata()
435 printdata(level + 1, p, x, len + x); in printdata()
436 x += len; in printdata()