• Home
  • Raw
  • Download

Lines Matching +full:8 +full:- +full:ch

1 // SPDX-License-Identifier: GPL-2.0-or-later
40 #define ASN1_EXT 8 /* External */
71 #define KRB5U2U_OID_LEN 8
76 static unsigned long KRB5U2U_OID[8] = { 1, 2, 840, 113554, 1, 2, 2, 3 };
100 ctx->begin = buf; in asn1_open()
101 ctx->end = buf + len; in asn1_open()
102 ctx->pointer = buf; in asn1_open()
103 ctx->error = ASN1_ERR_NOERROR; in asn1_open()
107 asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) in asn1_octet_decode() argument
109 if (ctx->pointer >= ctx->end) { in asn1_octet_decode()
110 ctx->error = ASN1_ERR_DEC_EMPTY; in asn1_octet_decode()
113 *ch = *(ctx->pointer)++; in asn1_octet_decode()
121 unsigned char ch;
123 if (ctx->pointer >= ctx->end) {
124 ctx->error = ASN1_ERR_DEC_EMPTY;
128 ch = *(ctx->pointer)++; /* ch has 0xa, ptr points to length octet */
129 if ((ch) == ASN1_ENUM) /* if ch value is ENUM, 0xa */
130 *val = *(++(ctx->pointer)); /* value has enum value */
134 ctx->pointer++;
142 unsigned char ch; in asn1_tag_decode() local
147 if (!asn1_octet_decode(ctx, &ch)) in asn1_tag_decode()
150 *tag |= ch & 0x7F; in asn1_tag_decode()
151 } while ((ch & 0x80) == 0x80); in asn1_tag_decode()
159 unsigned char ch; in asn1_id_decode() local
161 if (!asn1_octet_decode(ctx, &ch)) in asn1_id_decode()
164 *cls = (ch & 0xC0) >> 6; in asn1_id_decode()
165 *con = (ch & 0x20) >> 5; in asn1_id_decode()
166 *tag = (ch & 0x1F); in asn1_id_decode()
178 unsigned char ch, cnt; in asn1_length_decode() local
180 if (!asn1_octet_decode(ctx, &ch)) in asn1_length_decode()
183 if (ch == 0x80) in asn1_length_decode()
188 if (ch < 0x80) in asn1_length_decode()
189 *len = ch; in asn1_length_decode()
191 cnt = (unsigned char) (ch & 0x7F); in asn1_length_decode()
195 if (!asn1_octet_decode(ctx, &ch)) in asn1_length_decode()
197 *len <<= 8; in asn1_length_decode()
198 *len |= ch; in asn1_length_decode()
199 cnt--; in asn1_length_decode()
205 if (*len > ctx->end - ctx->pointer) in asn1_length_decode()
230 *eoc = ctx->pointer + len; in asn1_header_decode()
239 unsigned char ch; in asn1_eoc_decode() local
242 if (!asn1_octet_decode(ctx, &ch)) in asn1_eoc_decode()
245 if (ch != 0x00) { in asn1_eoc_decode()
246 ctx->error = ASN1_ERR_DEC_EOC_MISMATCH; in asn1_eoc_decode()
250 if (!asn1_octet_decode(ctx, &ch)) in asn1_eoc_decode()
253 if (ch != 0x00) { in asn1_eoc_decode()
254 ctx->error = ASN1_ERR_DEC_EOC_MISMATCH; in asn1_eoc_decode()
259 if (ctx->pointer != eoc) { in asn1_eoc_decode()
260 ctx->error = ASN1_ERR_DEC_LENGTH_MISMATCH; in asn1_eoc_decode()
270 ctx->pointer = eoc;
277 unsigned char ch;
280 if (!asn1_octet_decode(ctx, &ch))
283 *integer = (signed char) ch;
286 while (ctx->pointer < eoc) {
288 ctx->error = ASN1_ERR_DEC_BADVALUE;
292 if (!asn1_octet_decode(ctx, &ch))
295 *integer <<= 8;
296 *integer |= ch;
305 unsigned char ch;
308 if (!asn1_octet_decode(ctx, &ch))
311 *integer = ch;
312 if (ch == 0)
317 while (ctx->pointer < eoc) {
319 ctx->error = ASN1_ERR_DEC_BADVALUE;
323 if (!asn1_octet_decode(ctx, &ch))
326 *integer <<= 8;
327 *integer |= ch;
336 unsigned char ch;
339 if (!asn1_octet_decode(ctx, &ch))
342 *integer = ch;
343 if (ch == 0)
348 while (ctx->pointer < eoc) {
350 ctx->error = ASN1_ERR_DEC_BADVALUE;
354 if (!asn1_octet_decode(ctx, &ch))
357 *integer <<= 8;
358 *integer |= ch;
372 *octets = kmalloc(eoc - ctx->pointer, GFP_ATOMIC);
378 while (ctx->pointer < eoc) {
392 unsigned char ch; in asn1_subid_decode() local
397 if (!asn1_octet_decode(ctx, &ch)) in asn1_subid_decode()
401 *subid |= ch & 0x7F; in asn1_subid_decode()
402 } while ((ch & 0x80) == 0x80); in asn1_subid_decode()
414 size = eoc - ctx->pointer + 1; in asn1_oid_decode()
437 optr[1] = subid - 40; in asn1_oid_decode()
440 optr[1] = subid - 80; in asn1_oid_decode()
446 while (ctx->pointer < eoc) { in asn1_oid_decode()
448 ctx->error = ASN1_ERR_DEC_BADVALUE; in asn1_oid_decode()
506 /* Check for SPNEGO OID -- remember to free obj->oid */ in decode_negTokenInit()
521 /* SPNEGO OID not present or garbled -- bail out */ in decode_negTokenInit()
588 server->sec_mskerberos = true; in decode_negTokenInit()
591 server->sec_kerberosu2u = true; in decode_negTokenInit()
594 server->sec_kerberos = true; in decode_negTokenInit()
597 server->sec_ntlmssp = true; in decode_negTokenInit()