Lines Matching refs:hdr
25 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr)
30 os_memset(hdr, 0, sizeof(*hdr));
34 hdr->identifier = *pos++;
35 hdr->class = hdr->identifier >> 6;
36 hdr->constructed = !!(hdr->identifier & (1 << 5));
38 if ((hdr->identifier & 0x1f) == 0x1f) {
39 hdr->tag = 0;
49 hdr->tag = (hdr->tag << 7) | (tmp & 0x7f);
52 hdr->tag = hdr->identifier & 0x1f;
62 hdr->length = 0;
73 hdr->length = (hdr->length << 8) | *pos++;
77 hdr->length = tmp;
80 if (end < pos || hdr->length > (unsigned int) (end - pos)) {
85 hdr->payload = pos;
137 struct asn1_hdr hdr;
139 if (asn1_get_next(buf, len, &hdr) < 0 || hdr.length == 0)
142 if (hdr.class != ASN1_CLASS_UNIVERSAL || hdr.tag != ASN1_TAG_OID) {
144 "tag 0x%x", hdr.class, hdr.tag);
148 *next = hdr.payload + hdr.length;
150 return asn1_parse_oid(hdr.payload, hdr.length, oid);