Lines Matching refs:ctx
26 ndr_add_auth_token(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_add_auth_token() argument
31 secp->auth_type = ctx->auth_type; in ndr_add_auth_token()
32 secp->auth_level = ctx->auth_level; in ndr_add_auth_token()
50 secp->auth_context_id = ctx->auth_context_id; in ndr_add_auth_token()
64 ndr_add_sec_context(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_add_sec_context() argument
68 if (ctx->auth_level == NDR_C_AUTHN_NONE || in ndr_add_sec_context()
69 ctx->auth_type == NDR_C_AUTHN_NONE) in ndr_add_sec_context()
72 if (ctx->auth_type != NDR_C_AUTHN_GSS_NETLOGON) in ndr_add_sec_context()
75 if (ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_INTEGRITY && in ndr_add_sec_context()
76 ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_PRIVACY) in ndr_add_sec_context()
79 if ((rc = ndr_add_auth_token(ctx, mxa)) != 0) in ndr_add_sec_context()
82 return (ctx->auth_ops.nao_init(ctx->auth_ctx, mxa)); in ndr_add_sec_context()
92 ndr_recv_sec_context(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_recv_sec_context() argument
97 if (ctx->auth_level == NDR_C_AUTHN_NONE || in ndr_recv_sec_context()
98 ctx->auth_type == NDR_C_AUTHN_NONE) { in ndr_recv_sec_context()
111 return (ctx->auth_ops.nao_recv(ctx->auth_ctx, mxa)); in ndr_recv_sec_context()
121 ndr_add_auth(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_add_auth() argument
125 if (ctx->auth_level == NDR_C_AUTHN_NONE || in ndr_add_auth()
126 ctx->auth_type == NDR_C_AUTHN_NONE) in ndr_add_auth()
129 if (ctx->auth_type != NDR_C_AUTHN_GSS_NETLOGON) in ndr_add_auth()
132 if (ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_INTEGRITY && in ndr_add_auth()
133 ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_PRIVACY) in ndr_add_auth()
136 if ((rc = ndr_add_auth_token(ctx, mxa)) != 0) in ndr_add_auth()
139 if (ctx->auth_level == NDR_C_AUTHN_LEVEL_PKT_PRIVACY) in ndr_add_auth()
140 return (ctx->auth_ops.nao_encrypt(ctx->auth_ctx, mxa)); in ndr_add_auth()
141 return (ctx->auth_ops.nao_sign(ctx->auth_ctx, mxa)); in ndr_add_auth()
154 ndr_check_auth(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_check_auth() argument
158 if (ctx->auth_level == NDR_C_AUTHN_NONE || in ndr_check_auth()
159 ctx->auth_type == NDR_C_AUTHN_NONE) { in ndr_check_auth()
167 if (ctx->auth_type != secp->auth_type || in ndr_check_auth()
168 ctx->auth_type != NDR_C_AUTHN_GSS_NETLOGON) in ndr_check_auth()
171 if (ctx->auth_level != secp->auth_level || in ndr_check_auth()
172 (ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_INTEGRITY && in ndr_check_auth()
173 ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_PRIVACY)) in ndr_check_auth()
176 if (ctx->auth_level == NDR_C_AUTHN_LEVEL_PKT_PRIVACY) in ndr_check_auth()
177 return (ctx->auth_ops.nao_decrypt(ctx->auth_ctx, mxa, in ndr_check_auth()
178 ctx->auth_verify_resp)); in ndr_check_auth()
179 return (ctx->auth_ops.nao_verify(ctx->auth_ctx, mxa, in ndr_check_auth()
180 ctx->auth_verify_resp)); in ndr_check_auth()