Lines Matching refs:ctx

70  *	hash: 16-byte "LanMan" (LM) hash (normally ctx->ct_lmhash)
111 * hash: 16-byte "NT" hash (normally ctx->ct_nthash)
119 MD4_CTX ctx;
130 MD4Init(&ctx);
131 MD4Update(&ctx, unipw, pwsz);
132 MD4Final(hash, &ctx);
186 ntlm_put_v1_responses(struct smb_ctx *ctx,
208 err = ntlm_v1_response(ntresp, ctx->ct_nthash,
209 ctx->ct_srv_chal, NTLM_CHAL_SZ);
221 if (ctx->ct_authflags & SMB_AT_LM1) {
223 err = ntlm_v1_response(lmresp, ctx->ct_lmhash,
224 ctx->ct_srv_chal, NTLM_CHAL_SZ);
232 ntlm_v1_session_key(ctx->ct_ssn_key, ctx->ct_nthash);
247 ntlm_put_v1x_responses(struct smb_ctx *ctx,
267 memcpy(challenges, ctx->ct_srv_chal, NTLM_CHAL_SZ);
268 memcpy(challenges + NTLM_CHAL_SZ, ctx->ct_clnonce, NTLM_CHAL_SZ);
286 err = ntlm_v1_response(ntresp, ctx->ct_nthash,
297 memcpy(lmresp, ctx->ct_clnonce, NTLM_CHAL_SZ);
302 ntlm_v1_session_key(ctx->ct_ssn_key, ctx->ct_nthash);
479 ntlm_put_v2_responses(struct smb_ctx *ctx, struct mbdata *ti_mbp,
494 if (ctx->ct_user[0] == '\0')
496 ucuser = utf8_str_toupper(ctx->ct_user);
508 err = ntlm_v2_hash(v2hash, ctx->ct_nthash,
509 ucuser, ctx->ct_domain);
524 v2hash, ctx->ct_srv_chal,
525 ctx->ct_clnonce, NTLM_CHAL_SZ);
528 mb_put_mem(lm_mbp, ctx->ct_clnonce, NTLM_CHAL_SZ, MB_MSYSTEM);
541 v2hash, ctx->ct_srv_chal,
550 ntlm_v2_session_key(ctx->ct_ssn_key, v2hash, ntresp);
595 ntlm_build_target_info(struct smb_ctx *ctx, struct mbuf *names,
625 mb_put_mem(mbp, ctx->ct_clnonce, NTLM_CHAL_SZ, MB_MSYSTEM);
636 ucdom = utf8_str_toupper(ctx->ct_domain);
656 ntlm_build_mac_key(struct smb_ctx *ctx, struct mbdata *ntresp_mbp)
669 ctx->ct_mackeylen = len;
670 ctx->ct_mackey = p;
671 memcpy(p, ctx->ct_ssn_key, NTLM_HASH_SZ);
683 ntlm2_kxkey(struct smb_ctx *ctx, struct mbdata *lm_mbp, uchar_t *kxkey)
689 memcpy(data, ctx->ct_srv_chal, NTLM_CHAL_SZ);
693 HMACT64(kxkey, ctx->ct_ssn_key, NTLM_HASH_SZ,