Lines Matching refs:p
149 get_key(const void *p, const void *end, in get_key() argument
155 p = simple_get_bytes(p, end, &alg, sizeof(alg)); in get_key()
156 if (IS_ERR(p)) in get_key()
171 p = ERR_PTR(-EINVAL); in get_key()
174 p = simple_get_netobj(p, end, &key); in get_key()
175 if (IS_ERR(p)) in get_key()
192 return p; in get_key()
198 p = ERR_PTR(-EINVAL); in get_key()
200 return p; in get_key()
204 gss_import_v1_context(const void *p, const void *end, struct krb5_ctx *ctx) in gss_import_v1_context() argument
210 p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate)); in gss_import_v1_context()
211 if (IS_ERR(p)) in gss_import_v1_context()
219 p = ERR_PTR(-EINVAL); in gss_import_v1_context()
227 if (unlikely(p + 20 > end || p + 20 < p)) { in gss_import_v1_context()
228 p = ERR_PTR(-EFAULT); in gss_import_v1_context()
231 p += 20; in gss_import_v1_context()
232 p = simple_get_bytes(p, end, &tmp, sizeof(tmp)); in gss_import_v1_context()
233 if (IS_ERR(p)) in gss_import_v1_context()
236 p = ERR_PTR(-ENOSYS); in gss_import_v1_context()
239 p = simple_get_bytes(p, end, &tmp, sizeof(tmp)); in gss_import_v1_context()
240 if (IS_ERR(p)) in gss_import_v1_context()
243 p = ERR_PTR(-ENOSYS); in gss_import_v1_context()
246 p = simple_get_bytes(p, end, &time32, sizeof(time32)); in gss_import_v1_context()
247 if (IS_ERR(p)) in gss_import_v1_context()
251 p = simple_get_bytes(p, end, &seq_send, sizeof(seq_send)); in gss_import_v1_context()
252 if (IS_ERR(p)) in gss_import_v1_context()
255 p = simple_get_netobj(p, end, &ctx->mech_used); in gss_import_v1_context()
256 if (IS_ERR(p)) in gss_import_v1_context()
258 p = get_key(p, end, ctx, &ctx->enc); in gss_import_v1_context()
259 if (IS_ERR(p)) in gss_import_v1_context()
261 p = get_key(p, end, ctx, &ctx->seq); in gss_import_v1_context()
262 if (IS_ERR(p)) in gss_import_v1_context()
264 if (p != end) { in gss_import_v1_context()
265 p = ERR_PTR(-EFAULT); in gss_import_v1_context()
278 return PTR_ERR(p); in gss_import_v1_context()
468 gss_import_v2_context(const void *p, const void *end, struct krb5_ctx *ctx, in gss_import_v2_context() argument
475 p = simple_get_bytes(p, end, &ctx->flags, sizeof(ctx->flags)); in gss_import_v2_context()
476 if (IS_ERR(p)) in gss_import_v2_context()
480 p = simple_get_bytes(p, end, &time32, sizeof(time32)); in gss_import_v2_context()
481 if (IS_ERR(p)) in gss_import_v2_context()
485 p = simple_get_bytes(p, end, &seq_send64, sizeof(seq_send64)); in gss_import_v2_context()
486 if (IS_ERR(p)) in gss_import_v2_context()
494 p = ERR_PTR(-EINVAL); in gss_import_v2_context()
497 p = simple_get_bytes(p, end, &ctx->enctype, sizeof(ctx->enctype)); in gss_import_v2_context()
498 if (IS_ERR(p)) in gss_import_v2_context()
507 p = ERR_PTR(-EINVAL); in gss_import_v2_context()
512 p = simple_get_bytes(p, end, ctx->Ksess, keylen); in gss_import_v2_context()
513 if (IS_ERR(p)) in gss_import_v2_context()
516 if (p != end) { in gss_import_v2_context()
517 p = ERR_PTR(-EINVAL); in gss_import_v2_context()
524 p = ERR_PTR(-ENOMEM); in gss_import_v2_context()
540 return PTR_ERR(p); in gss_import_v2_context()
544 gss_import_sec_context_kerberos(const void *p, size_t len, in gss_import_sec_context_kerberos() argument
549 const void *end = (const void *)((const char *)p + len); in gss_import_sec_context_kerberos()
558 ret = gss_import_v1_context(p, end, ctx); in gss_import_sec_context_kerberos()
560 ret = gss_import_v2_context(p, end, ctx, gfp_mask); in gss_import_sec_context_kerberos()