Lines Matching full:av
289 * and client time (total five av pairs and + one end of fields indicator.
311 * structure (av pair) which holds name/size in build_avpair_blob()
327 * As defined in MS-NTLM 3.3.2, just this av pair field in build_avpair_blob()
338 #define AV_TYPE(av) (le16_to_cpu(av->type)) argument
339 #define AV_LEN(av) (le16_to_cpu(av->length)) argument
340 #define AV_DATA_PTR(av) ((void *)av->data) argument
342 #define av_for_each_entry(ses, av) \ argument
343 for (av = NULL; (av = find_next_av(ses, av));)
346 struct ntlmssp2_name *av) in find_next_av() argument
352 if (!av) { in find_next_av()
355 av = (void *)ses->auth_key.response; in find_next_av()
357 av = (void *)((u8 *)av + sizeof(*av) + AV_LEN(av)); in find_next_av()
360 if ((u8 *)av + sizeof(*av) > end) in find_next_av()
363 len = AV_LEN(av); in find_next_av()
364 if (AV_TYPE(av) == NTLMSSP_AV_EOL) in find_next_av()
366 if ((u8 *)av + sizeof(*av) + len > end) in find_next_av()
368 return av; in find_next_av()
372 * Check if server has provided av pair of @type in the NTLMSSP
378 struct ntlmssp2_name *av; in find_av_name() local
384 av_for_each_entry(ses, av) { in find_av_name()
385 len = AV_LEN(av); in find_av_name()
386 if (AV_TYPE(av) != type || !len) in find_av_name()
399 cifs_from_utf16(*name, AV_DATA_PTR(av), nlen, in find_av_name()
407 /* Server has provided av pairs/target info in the type 2 challenge
415 struct ntlmssp2_name *av; in find_timestamp() local
418 av_for_each_entry(ses, av) { in find_timestamp()
419 if (AV_TYPE(av) == NTLMSSP_AV_TIMESTAMP && in find_timestamp()
420 AV_LEN(av) == sizeof(u64)) in find_timestamp()
421 return *((__le64 *)AV_DATA_PTR(av)); in find_timestamp()
510 * existing list of AV pairs.
518 struct ntlmssp2_name *av; in set_auth_key_response() local
533 av_for_each_entry(ses, av) in set_auth_key_response()
534 tilen += sizeof(*av) + AV_LEN(av); in set_auth_key_response()
536 len = baselen + tilen + spnlen * sizeof(__le16) + num_avs * sizeof(*av); in set_auth_key_response()
544 av = (void *)(rsp + baselen + tilen); in set_auth_key_response()
545 av->type = cpu_to_le16(NTLMSSP_AV_TARGET_NAME); in set_auth_key_response()
546 av->length = cpu_to_le16(spnlen * sizeof(__le16)); in set_auth_key_response()
547 cifs_strtoUTF16((__le16 *)av->data, spn, spnlen, ses->local_nls); in set_auth_key_response()
548 av = (void *)((__u8 *)av + sizeof(*av) + AV_LEN(av)); in set_auth_key_response()
549 av->type = cpu_to_le16(NTLMSSP_AV_EOL); in set_auth_key_response()
550 av->length = 0; in set_auth_key_response()
603 cifs_dbg(VFS, "error %d building av pair blob\n", rc); in setup_ntlmv2_rsp()