Lines Matching refs:hdr
48 struct asn1_hdr hdr; in pkcs5_get_params() local
81 if (asn1_get_next(pos, enc_alg_end - pos, &hdr) < 0 || in pkcs5_get_params()
82 hdr.class != ASN1_CLASS_UNIVERSAL || in pkcs5_get_params()
83 hdr.tag != ASN1_TAG_SEQUENCE) { in pkcs5_get_params()
86 hdr.class, hdr.tag); in pkcs5_get_params()
89 pos = hdr.payload; in pkcs5_get_params()
90 end = hdr.payload + hdr.length; in pkcs5_get_params()
93 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in pkcs5_get_params()
94 hdr.class != ASN1_CLASS_UNIVERSAL || in pkcs5_get_params()
95 hdr.tag != ASN1_TAG_OCTETSTRING || in pkcs5_get_params()
96 hdr.length != 8) { in pkcs5_get_params()
99 hdr.class, hdr.tag, hdr.length); in pkcs5_get_params()
102 pos = hdr.payload + hdr.length; in pkcs5_get_params()
103 os_memcpy(params->salt, hdr.payload, hdr.length); in pkcs5_get_params()
104 params->salt_len = hdr.length; in pkcs5_get_params()
109 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in pkcs5_get_params()
110 hdr.class != ASN1_CLASS_UNIVERSAL || hdr.tag != ASN1_TAG_INTEGER) { in pkcs5_get_params()
112 "class %d tag 0x%x", hdr.class, hdr.tag); in pkcs5_get_params()
115 if (hdr.length == 1) in pkcs5_get_params()
116 params->iter_count = *hdr.payload; in pkcs5_get_params()
117 else if (hdr.length == 2) in pkcs5_get_params()
118 params->iter_count = WPA_GET_BE16(hdr.payload); in pkcs5_get_params()
119 else if (hdr.length == 4) in pkcs5_get_params()
120 params->iter_count = WPA_GET_BE32(hdr.payload); in pkcs5_get_params()
124 hdr.payload, hdr.length); in pkcs5_get_params()