Lines Matching refs:ctx
78 ssh_gssapi_acquire_cred(Gssctxt *ctx)
85 gss_add_oid_set_member(&status, ctx->oid, &oidset);
92 if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
94 return (ctx->major);
97 if ((ctx->major = gss_acquire_cred(&ctx->minor,
98 ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL)))
99 ssh_gssapi_error(ctx);
102 return (ctx->major);
107 ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid)
109 if (*ctx)
110 ssh_gssapi_delete_ctx(ctx);
111 ssh_gssapi_build_ctx(ctx);
112 ssh_gssapi_set_oid(*ctx, oid);
113 return (ssh_gssapi_acquire_cred(*ctx));
149 ssh_gssapi_accept_ctx(Gssctxt *ctx, gss_buffer_desc *recv_tok,
155 ctx->major = gss_accept_sec_context(&ctx->minor,
156 &ctx->context, ctx->creds, recv_tok,
157 GSS_C_NO_CHANNEL_BINDINGS, &ctx->client, &mech,
158 send_tok, flags, NULL, &ctx->client_creds);
160 if (GSS_ERROR(ctx->major))
161 ssh_gssapi_error(ctx);
163 if (ctx->client_creds)
168 status = ctx->major;
175 (*flags & GSS_C_INTEG_FLAG))) && (ctx->major == GSS_S_COMPLETE)) {
176 if (ssh_gssapi_getclient(ctx, &gssapi_client))
189 ssh_gssapi_parse_ename(Gssctxt *ctx, gss_buffer_t ename, gss_buffer_t name)
221 !ssh_gssapi_check_oid(ctx, tok+6, oidl))
249 ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
258 if (supported_mechs[i]->oid.length == ctx->oid->length &&
260 ctx->oid->elements, ctx->oid->length) == 0))
268 if ((ctx->major = gss_display_name(&ctx->minor, ctx->client,
270 ssh_gssapi_error(ctx);
271 return (ctx->major);
274 if ((ctx->major = gss_export_name(&ctx->minor, ctx->client,
276 ssh_gssapi_error(ctx);
277 return (ctx->major);
280 if ((ctx->major = ssh_gssapi_parse_ename(ctx,&ename,
282 return (ctx->major);
286 client->creds = ctx->client_creds;
287 ctx->client_creds = GSS_C_NO_CREDENTIAL;
288 return (ctx->major);
359 ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
361 ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
364 return (ctx->major);