Lines Matching refs:nas

120 netr_show_sig(nl_auth_sig_t *nas, ndr_stream_t *nds)  in netr_show_sig()  argument
125 nas->nas_sig_alg, nas->nas_seal_alg, nas->nas_pad, in netr_show_sig()
126 nas->nas_flags, *(uint64_t *)nas->nas_seqnum, in netr_show_sig()
127 *(uint64_t *)nas->nas_sig, *(uint64_t *)nas->nas_confounder); in netr_show_sig()
294 netr_ssp_make_token(netr_info_t *auth, ndr_stream_t *nds, nl_auth_sig_t *nas, in netr_ssp_make_token() argument
316 nas->nas_sig_alg = 0x0077; in netr_ssp_make_token()
318 nas->nas_seal_alg = 0x007A; in netr_ssp_make_token()
320 nas->nas_seal_alg = 0xffff; in netr_ssp_make_token()
321 nas->nas_pad = 0xffff; in netr_ssp_make_token()
322 nas->nas_flags = 0; in netr_ssp_make_token()
329 nas->nas_seqnum[0] = CLS_BYTE(3, auth->clh_seqnum); in netr_ssp_make_token()
330 nas->nas_seqnum[1] = CLS_BYTE(2, auth->clh_seqnum); in netr_ssp_make_token()
331 nas->nas_seqnum[2] = CLS_BYTE(1, auth->clh_seqnum); in netr_ssp_make_token()
332 nas->nas_seqnum[3] = CLS_BYTE(0, auth->clh_seqnum); in netr_ssp_make_token()
333 nas->nas_seqnum[4] = CLS_BYTE(7, auth->clh_seqnum) | 0x80; in netr_ssp_make_token()
334 nas->nas_seqnum[5] = CLS_BYTE(6, auth->clh_seqnum); in netr_ssp_make_token()
335 nas->nas_seqnum[6] = CLS_BYTE(5, auth->clh_seqnum); in netr_ssp_make_token()
336 nas->nas_seqnum[7] = CLS_BYTE(4, auth->clh_seqnum); in netr_ssp_make_token()
350 MD5Update(&md5h, (uchar_t *)nas, 8); in netr_ssp_make_token()
361 bcopy(local_sig, nas->nas_sig, 8); in netr_ssp_make_token()
381 (uchar_t *)nas->nas_seqnum, sizeof (nas->nas_seqnum), in netr_ssp_make_token()
387 if (smb_auth_RC4(nas->nas_confounder, in netr_ssp_make_token()
388 sizeof (nas->nas_confounder), in netr_ssp_make_token()
405 (uchar_t *)nas->nas_sig, sizeof (nas->nas_sig), enc_key) != 0) in netr_ssp_make_token()
408 if (smb_auth_RC4(nas->nas_seqnum, sizeof (nas->nas_seqnum), in netr_ssp_make_token()
410 nas->nas_seqnum, sizeof (nas->nas_seqnum)) != 0) in netr_ssp_make_token()
431 netr_ssp_check_token(netr_info_t *auth, ndr_stream_t *nds, nl_auth_sig_t *nas, in netr_ssp_check_token() argument
448 if (nas->nas_sig_alg != 0x0077 || in netr_ssp_check_token()
449 nas->nas_seal_alg != (has_confounder ? 0x007A : 0xffff) || in netr_ssp_check_token()
450 nas->nas_pad != 0xffff) { in netr_ssp_check_token()
457 (uchar_t *)nas->nas_sig, sizeof (nas->nas_sig), dec_key) != 0) { in netr_ssp_check_token()
461 if (smb_auth_RC4(nas->nas_seqnum, sizeof (nas->nas_seqnum), in netr_ssp_check_token()
463 nas->nas_seqnum, sizeof (nas->nas_seqnum)) != 0) { in netr_ssp_check_token()
482 if (bcmp(local_seqnum, nas->nas_seqnum, sizeof (local_seqnum)) != 0) { in netr_ssp_check_token()
485 *(uint64_t *)local_seqnum, *(uint64_t *)nas->nas_seqnum); in netr_ssp_check_token()
510 nas->nas_confounder, sizeof (nas->nas_confounder)) != 0) { in netr_ssp_check_token()
528 MD5Update(&md5h, (uchar_t *)nas, 8); in netr_ssp_check_token()
541 if (bcmp(local_sig, nas->nas_sig, 8) != 0) { in netr_ssp_check_token()
544 *(uint64_t *)local_sig, *(uint64_t *)nas->nas_sig); in netr_ssp_check_token()
553 netr_show_sig(nas, nds); in netr_ssp_check_token()
573 nl_auth_sig_t *nas; in netr_ssp_sign() local
577 (offsetof(nl_auth_sig_t, nas_sig) + sizeof (nas->nas_sig))); in netr_ssp_sign()
578 nas = NDR_MALLOC(mxa, sizeof (*nas)); in netr_ssp_sign()
579 if (nas == NULL) in netr_ssp_sign()
582 mxa->send_auth.auth_value = (void *)nas; in netr_ssp_sign()
584 return (netr_ssp_make_token(arg, &mxa->send_nds, nas, NULL)); in netr_ssp_sign()
595 nl_auth_sig_t *nas = (nl_auth_sig_t *)secp->auth_value; in netr_ssp_verify() local
600 return (netr_ssp_check_token(arg, &mxa->recv_nds, nas, verify_resp, in netr_ssp_verify()
614 nl_auth_sig_t *nas; in netr_ssp_encrypt() local
617 CTASSERT(NL_AUTH_SIG_SEAL_SIZE == sizeof (*nas)); in netr_ssp_encrypt()
618 nas = NDR_MALLOC(mxa, sizeof (*nas)); in netr_ssp_encrypt()
619 if (nas == NULL) in netr_ssp_encrypt()
622 mxa->send_auth.auth_value = (void *)nas; in netr_ssp_encrypt()
625 return (netr_ssp_make_token(arg, &mxa->send_nds, nas, confounder)); in netr_ssp_encrypt()
637 nl_auth_sig_t *nas = (nl_auth_sig_t *)secp->auth_value; in netr_ssp_decrypt() local
642 return (netr_ssp_check_token(arg, &mxa->recv_nds, nas, verify_resp, in netr_ssp_decrypt()