1 /* #ident "@(#)mglueP.h 1.2 96/01/18 SMI" */
4 * This header contains the private mechglue definitions.
6 * Copyright (c) 1995, by Sun Microsystems, Inc.
10 #ifndef _GSS_MECHGLUEP_H
11 #define _GSS_MECHGLUEP_H
16 * Array of context IDs typed by mechanism OID
18 typedef struct gss_union_ctx_id_t {
20 gss_ctx_id_t internal_ctx_id;
21 } gss_union_ctx_id_desc, *gss_union_ctx_id_t;
24 * Generic GSSAPI names. A name can either be a generic name, or a
25 * mechanism specific name....
27 typedef struct gss_union_name_t {
29 gss_buffer_t external_name;
31 * These last two fields are only filled in for mechanism
36 } gss_union_name_desc, *gss_union_name_t;
39 * Structure for holding list of mechanism-specific name types
41 typedef struct gss_mech_spec_name_t {
44 struct gss_mech_spec_name_t *next, *prev;
45 } gss_mech_spec_name_desc, *gss_mech_spec_name;
48 * Credential auxiliary info, used in the credential structure
50 typedef struct gss_union_cred_auxinfo {
56 } gss_union_cred_auxinfo;
59 * Set of Credentials typed on mechanism OID
61 typedef struct gss_union_cred_t {
64 gss_cred_id_t * cred_array;
65 gss_union_cred_auxinfo auxinfo;
66 } gss_union_cred_desc, *gss_union_cred_t;
68 /********************************************************/
69 /* The Mechanism Dispatch Table -- a mechanism needs to */
70 /* define one of these and provide a function to return */
71 /* it to initialize the GSSAPI library */
73 /* ultrix cc doesn't understand prototypes in structures.
74 we could autoconf test for this --marc */
77 #if defined(__ultrix) && !defined (__GNUC__)
78 #define NPROTOTYPE(x) ()
80 #define NPROTOTYPE(x) PROTOTYPE(x)
85 * This is the definition of the mechs_array struct, which is used to
86 * define the mechs array table. This table is used to indirectly
87 * access mechanism specific versions of the gssapi routines through
88 * the routines in the glue module (gssd_mech_glue.c)
90 * This contants all of the functions defined in gssapi.h except for
91 * gss_release_buffer() and gss_release_oid_set(), which I am
92 * assuming, for now, to be equal across mechanisms.
95 typedef struct gss_config {
96 gss_OID_desc mech_type;
98 OM_uint32 (*gss_acquire_cred)
101 OM_uint32*, /* minor_status */
102 gss_name_t, /* desired_name */
103 OM_uint32, /* time_req */
104 gss_OID_set, /* desired_mechs */
105 int, /* cred_usage */
106 gss_cred_id_t*, /* output_cred_handle */
107 gss_OID_set*, /* actual_mechs */
108 OM_uint32* /* time_rec */
110 OM_uint32 (*gss_release_cred)
113 OM_uint32*, /* minor_status */
114 gss_cred_id_t* /* cred_handle */
116 OM_uint32 (*gss_init_sec_context)
119 OM_uint32*, /* minor_status */
120 gss_cred_id_t, /* claimant_cred_handle */
121 gss_ctx_id_t*, /* context_handle */
122 gss_name_t, /* target_name */
123 gss_OID, /* mech_type */
124 OM_uint32, /* req_flags */
125 OM_uint32, /* time_req */
126 gss_channel_bindings_t, /* input_chan_bindings */
127 gss_buffer_t, /* input_token */
128 gss_OID*, /* actual_mech_type */
129 gss_buffer_t, /* output_token */
130 OM_uint32*, /* ret_flags */
131 OM_uint32* /* time_rec */
133 OM_uint32 (*gss_accept_sec_context)
136 OM_uint32*, /* minor_status */
137 gss_ctx_id_t*, /* context_handle */
138 gss_cred_id_t, /* verifier_cred_handle */
139 gss_buffer_t, /* input_token_buffer */
140 gss_channel_bindings_t, /* input_chan_bindings */
141 gss_name_t*, /* src_name */
142 gss_OID*, /* mech_type */
143 gss_buffer_t, /* output_token */
144 OM_uint32*, /* ret_flags */
145 OM_uint32*, /* time_rec */
146 gss_cred_id_t* /* delegated_cred_handle */
148 OM_uint32 (*gss_process_context_token)
151 OM_uint32*, /* minor_status */
152 gss_ctx_id_t, /* context_handle */
153 gss_buffer_t /* token_buffer */
155 OM_uint32 (*gss_delete_sec_context)
158 OM_uint32*, /* minor_status */
159 gss_ctx_id_t*, /* context_handle */
160 gss_buffer_t /* output_token */
162 OM_uint32 (*gss_context_time)
165 OM_uint32*, /* minor_status */
166 gss_ctx_id_t, /* context_handle */
167 OM_uint32* /* time_rec */
169 OM_uint32 (*gss_sign)
172 OM_uint32*, /* minor_status */
173 gss_ctx_id_t, /* context_handle */
175 gss_buffer_t, /* message_buffer */
176 gss_buffer_t /* message_token */
178 OM_uint32 (*gss_verify)
181 OM_uint32*, /* minor_status */
182 gss_ctx_id_t, /* context_handle */
183 gss_buffer_t, /* message_buffer */
184 gss_buffer_t, /* token_buffer */
187 OM_uint32 (*gss_seal)
190 OM_uint32*, /* minor_status */
191 gss_ctx_id_t, /* context_handle */
192 int, /* conf_req_flag */
194 gss_buffer_t, /* input_message_buffer */
195 int*, /* conf_state */
196 gss_buffer_t /* output_message_buffer */
198 OM_uint32 (*gss_unseal)
201 OM_uint32*, /* minor_status */
202 gss_ctx_id_t, /* context_handle */
203 gss_buffer_t, /* input_message_buffer */
204 gss_buffer_t, /* output_message_buffer */
205 int*, /* conf_state */
208 OM_uint32 (*gss_display_status)
211 OM_uint32*, /* minor_status */
212 OM_uint32, /* status_value */
213 int, /* status_type */
214 gss_OID, /* mech_type */
215 OM_uint32*, /* message_context */
216 gss_buffer_t /* status_string */
218 OM_uint32 (*gss_indicate_mechs)
221 OM_uint32*, /* minor_status */
222 gss_OID_set* /* mech_set */
224 OM_uint32 (*gss_compare_name)
227 OM_uint32*, /* minor_status */
228 gss_name_t, /* name1 */
229 gss_name_t, /* name2 */
230 int* /* name_equal */
232 OM_uint32 (*gss_display_name)
235 OM_uint32*, /* minor_status */
236 gss_name_t, /* input_name */
237 gss_buffer_t, /* output_name_buffer */
238 gss_OID* /* output_name_type */
240 OM_uint32 (*gss_import_name)
243 OM_uint32*, /* minor_status */
244 gss_buffer_t, /* input_name_buffer */
245 gss_OID, /* input_name_type */
246 gss_name_t* /* output_name */
248 OM_uint32 (*gss_release_name)
251 OM_uint32*, /* minor_status */
252 gss_name_t* /* input_name */
254 OM_uint32 (*gss_inquire_cred)
257 OM_uint32 *, /* minor_status */
258 gss_cred_id_t, /* cred_handle */
259 gss_name_t *, /* name */
260 OM_uint32 *, /* lifetime */
261 int *, /* cred_usage */
262 gss_OID_set * /* mechanisms */
264 OM_uint32 (*gss_add_cred)
267 OM_uint32 *, /* minor_status */
268 gss_cred_id_t, /* input_cred_handle */
269 gss_name_t, /* desired_name */
270 gss_OID, /* desired_mech */
271 gss_cred_usage_t, /* cred_usage */
272 OM_uint32, /* initiator_time_req */
273 OM_uint32, /* acceptor_time_req */
274 gss_cred_id_t *, /* output_cred_handle */
275 gss_OID_set *, /* actual_mechs */
276 OM_uint32 *, /* initiator_time_rec */
277 OM_uint32 * /* acceptor_time_rec */
279 OM_uint32 (*gss_export_sec_context)
282 OM_uint32 *, /* minor_status */
283 gss_ctx_id_t *, /* context_handle */
284 gss_buffer_t /* interprocess_token */
286 OM_uint32 (*gss_import_sec_context)
288 void *, /* context */
289 OM_uint32 *, /* minor_status */
290 gss_buffer_t, /* interprocess_token */
291 gss_ctx_id_t * /* context_handle */
293 OM_uint32 (*gss_inquire_cred_by_mech)
295 void *, /* context */
296 OM_uint32 *, /* minor_status */
297 gss_cred_id_t, /* cred_handle */
298 gss_OID, /* mech_type */
299 gss_name_t *, /* name */
300 OM_uint32 *, /* initiator_lifetime */
301 OM_uint32 *, /* acceptor_lifetime */
302 gss_cred_usage_t * /* cred_usage */
304 OM_uint32 (*gss_inquire_names_for_mech)
306 void *, /* context */
307 OM_uint32 *, /* minor_status */
308 gss_OID, /* mechanism */
309 gss_OID_set * /* name_types */
311 OM_uint32 (*gss_inquire_context)
313 void *, /* context */
314 OM_uint32 *, /* minor_status */
315 gss_ctx_id_t, /* context_handle */
316 gss_name_t *, /* src_name */
317 gss_name_t *, /* targ_name */
318 OM_uint32 *, /* lifetime_rec */
319 gss_OID *, /* mech_type */
320 OM_uint32 *, /* ctx_flags */
321 int *, /* locally_initiated */
324 OM_uint32 (*gss_internal_release_oid)
326 void *, /* context */
327 OM_uint32 *, /* minor_status */
330 OM_uint32 (*gss_wrap_size_limit)
332 void *, /* context */
333 OM_uint32 *, /* minor_status */
334 gss_ctx_id_t, /* context_handle */
335 int, /* conf_req_flag */
336 gss_qop_t, /* qop_req */
337 OM_uint32, /* req_output_size */
338 OM_uint32 * /* max_input_size */
342 void *, /* context */
344 gss_OID, /* name type */
345 gss_OID, /* mech type */
351 /********************************************************/
352 /* Internal mechglue routines */
354 gss_mechanism __gss_get_mechanism
355 PROTOTYPE((gss_OID));
356 OM_uint32 __gss_get_mech_type
357 PROTOTYPE((gss_OID, gss_buffer_t));
358 OM_uint32 __gss_import_internal_name
359 PROTOTYPE((OM_uint32 *, gss_OID, gss_union_name_t,
361 OM_uint32 __gss_display_internal_name
362 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t,
363 gss_buffer_t, gss_OID *));
364 OM_uint32 __gss_release_internal_name
365 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t *));
367 OM_uint32 __gss_convert_name_to_union_name
368 PROTOTYPE((OM_uint32 *, /* minor_status */
369 gss_mechanism, /* mech */
370 gss_name_t, /* internal_name */
371 gss_name_t * /* external_name */
373 gss_cred_id_t __gss_get_mechanism_cred
374 PROTOTYPE((gss_union_cred_t, /* union_cred */
375 gss_OID /* mech_type */
378 OM_uint32 generic_gss_release_oid
379 PROTOTYPE( (OM_uint32 *, /* minor_status */
383 OM_uint32 generic_gss_copy_oid
384 PROTOTYPE( (OM_uint32 *, /* minor_status */
386 gss_OID * /* new_oid */
389 OM_uint32 generic_gss_create_empty_oid_set
390 PROTOTYPE( (OM_uint32 *, /* minor_status */
391 gss_OID_set * /* oid_set */
394 OM_uint32 generic_gss_add_oid_set_member
395 PROTOTYPE( (OM_uint32 *, /* minor_status */
396 gss_OID, /* member_oid */
397 gss_OID_set * /* oid_set */
400 OM_uint32 generic_gss_test_oid_set_member
401 PROTOTYPE( (OM_uint32 *, /* minor_status */
402 gss_OID, /* member */
403 gss_OID_set, /* set */
407 OM_uint32 generic_gss_oid_to_str
408 PROTOTYPE( (OM_uint32 *, /* minor_status */
410 gss_buffer_t /* oid_str */
413 OM_uint32 generic_gss_str_to_oid
414 PROTOTYPE( (OM_uint32 *, /* minor_status */
415 gss_buffer_t, /* oid_str */
420 gss_OID gss_find_mechanism_from_name_type
421 PROTOTYPE ( (gss_OID /* name_type */
424 OM_uint32 gss_add_mech_name_type
425 PROTOTYPE ( (OM_uint32 *, /* minor_status */
426 gss_OID, /* name_type */
430 #endif /* _GSS_MECHGLUEP_H */