Lines Matching defs:buf
59 static void encode_asn_tag(char *buf, unsigned int *ofs, char tag, char seq,
68 buf[index++] = tag;
71 buf[index++] = len;
73 buf[index++] = 0x80 | hdr_len;
75 buf[index++] = (len >> (i * 8)) & 0xFF;
80 buf[index++] = seq;
83 buf[index++] = len;
85 buf[index++] = 0x80 | hdr_len;
87 buf[index++] = (len >> (i * 8)) & 0xFF;
96 char *buf;
107 buf = kmalloc(total_len, GFP_KERNEL);
108 if (!buf)
112 encode_asn_tag(buf, &ofs, 0xa1, 0x30, neg_result_len + oid_len +
116 encode_asn_tag(buf, &ofs, 0xa0, 0x0a, 1);
117 buf[ofs++] = 1;
120 encode_asn_tag(buf, &ofs, 0xa1, 0x06, NTLMSSP_OID_LEN);
121 memcpy(buf + ofs, NTLMSSP_OID_STR, NTLMSSP_OID_LEN);
125 encode_asn_tag(buf, &ofs, 0xa2, 0x04, ntlm_blob_len);
126 memcpy(buf + ofs, ntlm_blob, ntlm_blob_len);
129 *pbuffer = buf;
137 char *buf;
143 buf = kmalloc(total_len, GFP_KERNEL);
144 if (!buf)
148 encode_asn_tag(buf, &ofs, 0xa1, 0x30, neg_result_len);
151 encode_asn_tag(buf, &ofs, 0xa0, 0x0a, 1);
153 buf[ofs++] = 2;
155 buf[ofs++] = 0;
157 *pbuffer = buf;
169 char buf[50];
171 sprint_oid(value, vlen, buf, sizeof(buf));
172 ksmbd_debug(AUTH, "Unexpected OID: %s\n", buf);
197 char buf[50];
199 sprint_oid(value, vlen, buf, sizeof(buf));
200 ksmbd_debug(AUTH, "Unexpected OID: %s\n", buf);