gss_wrap.c (33f12199250a09b573f7a518b523fdac3f120b8f) gss_wrap.c (6baf7cc80ea9cb47434833c387c09cacfd248571)
1/*-
2 * Copyright (c) 2005 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 const gss_ctx_id_t context_handle,
38 int conf_req_flag,
39 gss_qop_t qop_req,
40 const gss_buffer_t input_message_buffer,
41 int *conf_state,
42 gss_buffer_t output_message_buffer)
43{
44 struct _gss_context *ctx = (struct _gss_context *) context_handle;
1/*-
2 * Copyright (c) 2005 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 28 unchanged lines hidden (view full) ---

37 const gss_ctx_id_t context_handle,
38 int conf_req_flag,
39 gss_qop_t qop_req,
40 const gss_buffer_t input_message_buffer,
41 int *conf_state,
42 gss_buffer_t output_message_buffer)
43{
44 struct _gss_context *ctx = (struct _gss_context *) context_handle;
45 struct _gss_mech_switch *m = ctx->gc_mech;
45 struct _gss_mech_switch *m;
46
47 if (conf_state)
48 *conf_state = 0;
49 _gss_buffer_zero(output_message_buffer);
50 if (ctx == NULL) {
51 *minor_status = 0;
52 return (GSS_S_NO_CONTEXT);
53 }
46
47 if (conf_state)
48 *conf_state = 0;
49 _gss_buffer_zero(output_message_buffer);
50 if (ctx == NULL) {
51 *minor_status = 0;
52 return (GSS_S_NO_CONTEXT);
53 }
54 m = ctx->gc_mech;
54
55 return (m->gm_wrap(minor_status, ctx->gc_ctx,
56 conf_req_flag, qop_req, input_message_buffer,
57 conf_state, output_message_buffer));
58}
55
56 return (m->gm_wrap(minor_status, ctx->gc_ctx,
57 conf_req_flag, qop_req, input_message_buffer,
58 conf_state, output_message_buffer));
59}