1 #ident "@(#)mglueP.h 1.2 96/01/18 SMI"
3 * This header contains the private mechglue definitions.
5 * Copyright (c) 1995, by Sun Microsystems, Inc.
9 #ifndef _GSS_MECHGLUEP_H
10 #define _GSS_MECHGLUEP_H
13 #include <sys/types.h>
20 * Array of context IDs typed by mechanism OID
22 typedef struct gss_union_ctx_id_t {
24 gss_ctx_id_t internal_ctx_id;
25 } gss_union_ctx_id_desc, *gss_union_ctx_id_t;
28 * Generic GSSAPI names. A name can either be a generic name, or a
29 * mechanism specific name....
31 typedef struct gss_union_name_t {
33 gss_buffer_t external_name;
35 * These last two fields are only filled in for mechanism
40 } gss_union_name_desc, *gss_union_name_t;
43 * Structure for holding list of mechanism-specific name types
45 typedef struct gss_mech_spec_name_t {
48 struct gss_mech_spec_name_t *next, *prev;
49 } gss_mech_spec_name_desc, *gss_mech_spec_name;
52 * Credential auxiliary info, used in the credential structure
54 typedef struct gss_union_cred_auxinfo {
60 } gss_union_cred_auxinfo;
63 * Set of Credentials typed on mechanism OID
65 typedef struct gss_union_cred_t {
68 gss_cred_id_t * cred_array;
69 gss_union_cred_auxinfo auxinfo;
70 } gss_union_cred_desc, *gss_union_cred_t;
72 /********************************************************/
73 /* The Mechanism Dispatch Table -- a mechanism needs to */
74 /* define one of these and provide a function to return */
75 /* it to initialize the GSSAPI library */
78 * This is the definition of the mechs_array struct, which is used to
79 * define the mechs array table. This table is used to indirectly
80 * access mechanism specific versions of the gssapi routines through
81 * the routines in the glue module (gssd_mech_glue.c)
83 * This contants all of the functions defined in gssapi.h except for
84 * gss_release_buffer() and gss_release_oid_set(), which I am
85 * assuming, for now, to be equal across mechanisms.
88 typedef struct gss_config {
89 gss_OID_desc mech_type;
91 OM_uint32 (*gss_acquire_cred)
94 OM_uint32*, /* minor_status */
95 gss_name_t, /* desired_name */
96 OM_uint32, /* time_req */
97 gss_OID_set, /* desired_mechs */
99 gss_cred_id_t*, /* output_cred_handle */
100 gss_OID_set*, /* actual_mechs */
101 OM_uint32* /* time_rec */
103 OM_uint32 (*gss_release_cred)
106 OM_uint32*, /* minor_status */
107 gss_cred_id_t* /* cred_handle */
109 OM_uint32 (*gss_init_sec_context)
112 OM_uint32*, /* minor_status */
113 gss_cred_id_t, /* claimant_cred_handle */
114 gss_ctx_id_t*, /* context_handle */
115 gss_name_t, /* target_name */
116 gss_OID, /* mech_type */
117 OM_uint32, /* req_flags */
118 OM_uint32, /* time_req */
119 gss_channel_bindings_t, /* input_chan_bindings */
120 gss_buffer_t, /* input_token */
121 gss_OID*, /* actual_mech_type */
122 gss_buffer_t, /* output_token */
123 OM_uint32*, /* ret_flags */
124 OM_uint32* /* time_rec */
126 OM_uint32 (*gss_accept_sec_context)
129 OM_uint32*, /* minor_status */
130 gss_ctx_id_t*, /* context_handle */
131 gss_cred_id_t, /* verifier_cred_handle */
132 gss_buffer_t, /* input_token_buffer */
133 gss_channel_bindings_t, /* input_chan_bindings */
134 gss_name_t*, /* src_name */
135 gss_OID*, /* mech_type */
136 gss_buffer_t, /* output_token */
137 OM_uint32*, /* ret_flags */
138 OM_uint32*, /* time_rec */
139 gss_cred_id_t* /* delegated_cred_handle */
141 OM_uint32 (*gss_process_context_token)
144 OM_uint32*, /* minor_status */
145 gss_ctx_id_t, /* context_handle */
146 gss_buffer_t /* token_buffer */
148 OM_uint32 (*gss_delete_sec_context)
151 OM_uint32*, /* minor_status */
152 gss_ctx_id_t*, /* context_handle */
153 gss_buffer_t /* output_token */
155 OM_uint32 (*gss_context_time)
158 OM_uint32*, /* minor_status */
159 gss_ctx_id_t, /* context_handle */
160 OM_uint32* /* time_rec */
162 OM_uint32 (*gss_sign)
165 OM_uint32*, /* minor_status */
166 gss_ctx_id_t, /* context_handle */
168 gss_buffer_t, /* message_buffer */
169 gss_buffer_t /* message_token */
171 OM_uint32 (*gss_verify)
174 OM_uint32*, /* minor_status */
175 gss_ctx_id_t, /* context_handle */
176 gss_buffer_t, /* message_buffer */
177 gss_buffer_t, /* token_buffer */
180 OM_uint32 (*gss_seal)
183 OM_uint32*, /* minor_status */
184 gss_ctx_id_t, /* context_handle */
185 int, /* conf_req_flag */
187 gss_buffer_t, /* input_message_buffer */
188 int*, /* conf_state */
189 gss_buffer_t /* output_message_buffer */
191 OM_uint32 (*gss_unseal)
194 OM_uint32*, /* minor_status */
195 gss_ctx_id_t, /* context_handle */
196 gss_buffer_t, /* input_message_buffer */
197 gss_buffer_t, /* output_message_buffer */
198 int*, /* conf_state */
201 OM_uint32 (*gss_display_status)
204 OM_uint32*, /* minor_status */
205 OM_uint32, /* status_value */
206 int, /* status_type */
207 gss_OID, /* mech_type */
208 OM_uint32*, /* message_context */
209 gss_buffer_t /* status_string */
211 OM_uint32 (*gss_indicate_mechs)
214 OM_uint32*, /* minor_status */
215 gss_OID_set* /* mech_set */
217 OM_uint32 (*gss_compare_name)
220 OM_uint32*, /* minor_status */
221 gss_name_t, /* name1 */
222 gss_name_t, /* name2 */
223 int* /* name_equal */
225 OM_uint32 (*gss_display_name)
228 OM_uint32*, /* minor_status */
229 gss_name_t, /* input_name */
230 gss_buffer_t, /* output_name_buffer */
231 gss_OID* /* output_name_type */
233 OM_uint32 (*gss_import_name)
236 OM_uint32*, /* minor_status */
237 gss_buffer_t, /* input_name_buffer */
238 gss_OID, /* input_name_type */
239 gss_name_t* /* output_name */
241 OM_uint32 (*gss_release_name)
244 OM_uint32*, /* minor_status */
245 gss_name_t* /* input_name */
247 OM_uint32 (*gss_inquire_cred)
250 OM_uint32 *, /* minor_status */
251 gss_cred_id_t, /* cred_handle */
252 gss_name_t *, /* name */
253 OM_uint32 *, /* lifetime */
254 int *, /* cred_usage */
255 gss_OID_set * /* mechanisms */
257 OM_uint32 (*gss_add_cred)
260 OM_uint32 *, /* minor_status */
261 gss_cred_id_t, /* input_cred_handle */
262 gss_name_t, /* desired_name */
263 gss_OID, /* desired_mech */
264 gss_cred_usage_t, /* cred_usage */
265 OM_uint32, /* initiator_time_req */
266 OM_uint32, /* acceptor_time_req */
267 gss_cred_id_t *, /* output_cred_handle */
268 gss_OID_set *, /* actual_mechs */
269 OM_uint32 *, /* initiator_time_rec */
270 OM_uint32 * /* acceptor_time_rec */
272 OM_uint32 (*gss_export_sec_context)
275 OM_uint32 *, /* minor_status */
276 gss_ctx_id_t *, /* context_handle */
277 gss_buffer_t /* interprocess_token */
279 OM_uint32 (*gss_import_sec_context)
281 void *, /* context */
282 OM_uint32 *, /* minor_status */
283 gss_buffer_t, /* interprocess_token */
284 gss_ctx_id_t * /* context_handle */
286 OM_uint32 (*gss_inquire_cred_by_mech)
288 void *, /* context */
289 OM_uint32 *, /* minor_status */
290 gss_cred_id_t, /* cred_handle */
291 gss_OID, /* mech_type */
292 gss_name_t *, /* name */
293 OM_uint32 *, /* initiator_lifetime */
294 OM_uint32 *, /* acceptor_lifetime */
295 gss_cred_usage_t * /* cred_usage */
297 OM_uint32 (*gss_inquire_names_for_mech)
299 void *, /* context */
300 OM_uint32 *, /* minor_status */
301 gss_OID, /* mechanism */
302 gss_OID_set * /* name_types */
304 OM_uint32 (*gss_inquire_context)
306 void *, /* context */
307 OM_uint32 *, /* minor_status */
308 gss_ctx_id_t, /* context_handle */
309 gss_name_t *, /* src_name */
310 gss_name_t *, /* targ_name */
311 OM_uint32 *, /* lifetime_rec */
312 gss_OID *, /* mech_type */
313 OM_uint32 *, /* ctx_flags */
314 int *, /* locally_initiated */
317 OM_uint32 (*gss_internal_release_oid)
319 void *, /* context */
320 OM_uint32 *, /* minor_status */
323 OM_uint32 (*gss_wrap_size_limit)
325 void *, /* context */
326 OM_uint32 *, /* minor_status */
327 gss_ctx_id_t, /* context_handle */
328 int, /* conf_req_flag */
329 gss_qop_t, /* qop_req */
330 OM_uint32, /* req_output_size */
331 OM_uint32 * /* max_input_size */
335 void *, /* context */
337 gss_OID, /* name type */
338 gss_OID, /* mech type */
344 /********************************************************/
345 /* Internal mechglue routines */
347 gss_mechanism __gss_get_mechanism
348 PROTOTYPE((gss_OID));
349 OM_uint32 __gss_get_mech_type
350 PROTOTYPE((gss_OID, gss_buffer_t));
351 OM_uint32 __gss_import_internal_name
352 PROTOTYPE((OM_uint32 *, gss_OID, gss_union_name_t,
354 OM_uint32 __gss_display_internal_name
355 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t,
356 gss_buffer_t, gss_OID *));
357 OM_uint32 __gss_release_internal_name
358 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t *));
360 OM_uint32 __gss_convert_name_to_union_name
361 PROTOTYPE((OM_uint32 *, /* minor_status */
362 gss_mechanism, /* mech */
363 gss_name_t, /* internal_name */
364 gss_name_t * /* external_name */
366 gss_cred_id_t __gss_get_mechanism_cred
367 PROTOTYPE((gss_union_cred_t, /* union_cred */
368 gss_OID /* mech_type */
371 OM_uint32 generic_gss_release_oid
372 PROTOTYPE( (OM_uint32 *, /* minor_status */
376 OM_uint32 generic_gss_copy_oid
377 PROTOTYPE( (OM_uint32 *, /* minor_status */
379 gss_OID * /* new_oid */
382 OM_uint32 generic_gss_create_empty_oid_set
383 PROTOTYPE( (OM_uint32 *, /* minor_status */
384 gss_OID_set * /* oid_set */
387 OM_uint32 generic_gss_add_oid_set_member
388 PROTOTYPE( (OM_uint32 *, /* minor_status */
389 gss_OID, /* member_oid */
390 gss_OID_set * /* oid_set */
393 OM_uint32 generic_gss_test_oid_set_member
394 PROTOTYPE( (OM_uint32 *, /* minor_status */
395 gss_OID, /* member */
396 gss_OID_set, /* set */
400 OM_uint32 generic_gss_oid_to_str
401 PROTOTYPE( (OM_uint32 *, /* minor_status */
403 gss_buffer_t /* oid_str */
406 OM_uint32 generic_gss_str_to_oid
407 PROTOTYPE( (OM_uint32 *, /* minor_status */
408 gss_buffer_t, /* oid_str */
413 gss_OID gss_find_mechanism_from_name_type
414 PROTOTYPE ( (gss_OID /* name_type */
417 OM_uint32 gss_add_mech_name_type
418 PROTOTYPE ( (OM_uint32 *, /* minor_status */
419 gss_OID, /* name_type */
423 #endif /* _GSS_MECHGLUEP_H */