Lines Matching defs:tag
151 uint32_t tag;
156 tag = c[(*p)++] & 0x1f;
158 if (tag != 0x1f)
159 return tag;
165 tag = tag * 128 + c[(*p)++] - 0x80;
169 return tag;
173 * Read the length of a DER tag from the input.
225 der_tag(char *buf, size_t len, uint32_t tag)
227 if (tag < DER_TAG_LAST)
228 strlcpy(buf, der__tag[tag], len);
230 snprintf(buf, len, "%#x", tag);
236 der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len)
239 switch (tag) {
270 DPRINTF(("%s: bad tag 1\n", __func__));
278 DPRINTF(("%s: bad tag 2\n", __func__));
307 uint32_t tag, tlen;
312 tag = gettag(b, &offs, len);
313 if (tag == DER_BAD) {
314 DPRINTF(("%s: bad tag 1\n", __func__));
323 DPRINTF(("%s: bad tag 2\n", __func__));
327 der_tag(buf, sizeof(buf), tag);
329 fprintf(stderr, "%s: tag %p got=%s exp=%s\n", __func__, b,
363 der_data(buf, sizeof(buf), tag, b + offs, tlen);
375 printtag(uint32_t tag, const void *q, uint32_t len)
378 switch (tag) {
408 uint32_t tag = gettag(p, &x, ep - p + x);
416 der_tag(buf, sizeof(buf), tag), len);
420 printtag(tag, q, len);