Home | History | Annotate | Download | only in tls

Lines Matching refs:hdr

20 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr)
25 os_memset(hdr, 0, sizeof(*hdr));
29 hdr->identifier = *pos++;
30 hdr->class = hdr->identifier >> 6;
31 hdr->constructed = !!(hdr->identifier & (1 << 5));
33 if ((hdr->identifier & 0x1f) == 0x1f) {
34 hdr->tag = 0;
44 hdr->tag = (hdr->tag << 7) | (tmp & 0x7f);
47 hdr->tag = hdr->identifier & 0x1f;
57 hdr->length = 0;
68 hdr->length = (hdr->length << 8) | *pos++;
72 hdr->length = tmp;
75 if (end < pos || hdr->length > (unsigned int) (end - pos)) {
80 hdr->payload = pos;
132 struct asn1_hdr hdr;
134 if (asn1_get_next(buf, len, &hdr) < 0 || hdr.length == 0)
137 if (hdr.class != ASN1_CLASS_UNIVERSAL || hdr.tag != ASN1_TAG_OID) {
139 "tag 0x%x", hdr.class, hdr.tag);
143 *next = hdr.payload + hdr.length;
145 return asn1_parse_oid(hdr.payload, hdr.length, oid);