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
14 #include <sys/types.h>
21 * Array of context IDs typed by mechanism OID
23 typedef struct gss_union_ctx_id_t {
25 gss_ctx_id_t internal_ctx_id;
26 } gss_union_ctx_id_desc, *gss_union_ctx_id_t;
29 * Generic GSSAPI names. A name can either be a generic name, or a
30 * mechanism specific name....
32 typedef struct gss_union_name_t {
34 gss_buffer_t external_name;
36 * These last two fields are only filled in for mechanism
41 } gss_union_name_desc, *gss_union_name_t;
44 * Structure for holding list of mechanism-specific name types
46 typedef struct gss_mech_spec_name_t {
49 struct gss_mech_spec_name_t *next, *prev;
50 } gss_mech_spec_name_desc, *gss_mech_spec_name;
53 * Credential auxiliary info, used in the credential structure
55 typedef struct gss_union_cred_auxinfo {
61 } gss_union_cred_auxinfo;
64 * Set of Credentials typed on mechanism OID
66 typedef struct gss_union_cred_t {
69 gss_cred_id_t * cred_array;
70 gss_union_cred_auxinfo auxinfo;
71 } gss_union_cred_desc, *gss_union_cred_t;
73 /********************************************************/
74 /* The Mechanism Dispatch Table -- a mechanism needs to */
75 /* define one of these and provide a function to return */
76 /* it to initialize the GSSAPI library */
79 * This is the definition of the mechs_array struct, which is used to
80 * define the mechs array table. This table is used to indirectly
81 * access mechanism specific versions of the gssapi routines through
82 * the routines in the glue module (gssd_mech_glue.c)
84 * This contants all of the functions defined in gssapi.h except for
85 * gss_release_buffer() and gss_release_oid_set(), which I am
86 * assuming, for now, to be equal across mechanisms.
89 typedef struct gss_config {
90 gss_OID_desc mech_type;
92 OM_uint32 (*gss_acquire_cred)
95 OM_uint32*, /* minor_status */
96 gss_name_t, /* desired_name */
97 OM_uint32, /* time_req */
98 gss_OID_set, /* desired_mechs */
100 gss_cred_id_t*, /* output_cred_handle */
101 gss_OID_set*, /* actual_mechs */
102 OM_uint32* /* time_rec */
104 OM_uint32 (*gss_release_cred)
107 OM_uint32*, /* minor_status */
108 gss_cred_id_t* /* cred_handle */
110 OM_uint32 (*gss_init_sec_context)
113 OM_uint32*, /* minor_status */
114 gss_cred_id_t, /* claimant_cred_handle */
115 gss_ctx_id_t*, /* context_handle */
116 gss_name_t, /* target_name */
117 gss_OID, /* mech_type */
118 OM_uint32, /* req_flags */
119 OM_uint32, /* time_req */
120 gss_channel_bindings_t, /* input_chan_bindings */
121 gss_buffer_t, /* input_token */
122 gss_OID*, /* actual_mech_type */
123 gss_buffer_t, /* output_token */
124 OM_uint32*, /* ret_flags */
125 OM_uint32* /* time_rec */
127 OM_uint32 (*gss_accept_sec_context)
130 OM_uint32*, /* minor_status */
131 gss_ctx_id_t*, /* context_handle */
132 gss_cred_id_t, /* verifier_cred_handle */
133 gss_buffer_t, /* input_token_buffer */
134 gss_channel_bindings_t, /* input_chan_bindings */
135 gss_name_t*, /* src_name */
136 gss_OID*, /* mech_type */
137 gss_buffer_t, /* output_token */
138 OM_uint32*, /* ret_flags */
139 OM_uint32*, /* time_rec */
140 gss_cred_id_t* /* delegated_cred_handle */
142 OM_uint32 (*gss_process_context_token)
145 OM_uint32*, /* minor_status */
146 gss_ctx_id_t, /* context_handle */
147 gss_buffer_t /* token_buffer */
149 OM_uint32 (*gss_delete_sec_context)
152 OM_uint32*, /* minor_status */
153 gss_ctx_id_t*, /* context_handle */
154 gss_buffer_t /* output_token */
156 OM_uint32 (*gss_context_time)
159 OM_uint32*, /* minor_status */
160 gss_ctx_id_t, /* context_handle */
161 OM_uint32* /* time_rec */
163 OM_uint32 (*gss_sign)
166 OM_uint32*, /* minor_status */
167 gss_ctx_id_t, /* context_handle */
169 gss_buffer_t, /* message_buffer */
170 gss_buffer_t /* message_token */
172 OM_uint32 (*gss_verify)
175 OM_uint32*, /* minor_status */
176 gss_ctx_id_t, /* context_handle */
177 gss_buffer_t, /* message_buffer */
178 gss_buffer_t, /* token_buffer */
181 OM_uint32 (*gss_seal)
184 OM_uint32*, /* minor_status */
185 gss_ctx_id_t, /* context_handle */
186 int, /* conf_req_flag */
188 gss_buffer_t, /* input_message_buffer */
189 int*, /* conf_state */
190 gss_buffer_t /* output_message_buffer */
192 OM_uint32 (*gss_unseal)
195 OM_uint32*, /* minor_status */
196 gss_ctx_id_t, /* context_handle */
197 gss_buffer_t, /* input_message_buffer */
198 gss_buffer_t, /* output_message_buffer */
199 int*, /* conf_state */
202 OM_uint32 (*gss_display_status)
205 OM_uint32*, /* minor_status */
206 OM_uint32, /* status_value */
207 int, /* status_type */
208 gss_OID, /* mech_type */
209 OM_uint32*, /* message_context */
210 gss_buffer_t /* status_string */
212 OM_uint32 (*gss_indicate_mechs)
215 OM_uint32*, /* minor_status */
216 gss_OID_set* /* mech_set */
218 OM_uint32 (*gss_compare_name)
221 OM_uint32*, /* minor_status */
222 gss_name_t, /* name1 */
223 gss_name_t, /* name2 */
224 int* /* name_equal */
226 OM_uint32 (*gss_display_name)
229 OM_uint32*, /* minor_status */
230 gss_name_t, /* input_name */
231 gss_buffer_t, /* output_name_buffer */
232 gss_OID* /* output_name_type */
234 OM_uint32 (*gss_import_name)
237 OM_uint32*, /* minor_status */
238 gss_buffer_t, /* input_name_buffer */
239 gss_OID, /* input_name_type */
240 gss_name_t* /* output_name */
242 OM_uint32 (*gss_release_name)
245 OM_uint32*, /* minor_status */
246 gss_name_t* /* input_name */
248 OM_uint32 (*gss_inquire_cred)
251 OM_uint32 *, /* minor_status */
252 gss_cred_id_t, /* cred_handle */
253 gss_name_t *, /* name */
254 OM_uint32 *, /* lifetime */
255 int *, /* cred_usage */
256 gss_OID_set * /* mechanisms */
258 OM_uint32 (*gss_add_cred)
261 OM_uint32 *, /* minor_status */
262 gss_cred_id_t, /* input_cred_handle */
263 gss_name_t, /* desired_name */
264 gss_OID, /* desired_mech */
265 gss_cred_usage_t, /* cred_usage */
266 OM_uint32, /* initiator_time_req */
267 OM_uint32, /* acceptor_time_req */
268 gss_cred_id_t *, /* output_cred_handle */
269 gss_OID_set *, /* actual_mechs */
270 OM_uint32 *, /* initiator_time_rec */
271 OM_uint32 * /* acceptor_time_rec */
273 OM_uint32 (*gss_export_sec_context)
276 OM_uint32 *, /* minor_status */
277 gss_ctx_id_t *, /* context_handle */
278 gss_buffer_t /* interprocess_token */
280 OM_uint32 (*gss_import_sec_context)
282 void *, /* context */
283 OM_uint32 *, /* minor_status */
284 gss_buffer_t, /* interprocess_token */
285 gss_ctx_id_t * /* context_handle */
287 OM_uint32 (*gss_inquire_cred_by_mech)
289 void *, /* context */
290 OM_uint32 *, /* minor_status */
291 gss_cred_id_t, /* cred_handle */
292 gss_OID, /* mech_type */
293 gss_name_t *, /* name */
294 OM_uint32 *, /* initiator_lifetime */
295 OM_uint32 *, /* acceptor_lifetime */
296 gss_cred_usage_t * /* cred_usage */
298 OM_uint32 (*gss_inquire_names_for_mech)
300 void *, /* context */
301 OM_uint32 *, /* minor_status */
302 gss_OID, /* mechanism */
303 gss_OID_set * /* name_types */
305 OM_uint32 (*gss_inquire_context)
307 void *, /* context */
308 OM_uint32 *, /* minor_status */
309 gss_ctx_id_t, /* context_handle */
310 gss_name_t *, /* src_name */
311 gss_name_t *, /* targ_name */
312 OM_uint32 *, /* lifetime_rec */
313 gss_OID *, /* mech_type */
314 OM_uint32 *, /* ctx_flags */
315 int *, /* locally_initiated */
318 OM_uint32 (*gss_internal_release_oid)
320 void *, /* context */
321 OM_uint32 *, /* minor_status */
324 OM_uint32 (*gss_wrap_size_limit)
326 void *, /* context */
327 OM_uint32 *, /* minor_status */
328 gss_ctx_id_t, /* context_handle */
329 int, /* conf_req_flag */
330 gss_qop_t, /* qop_req */
331 OM_uint32, /* req_output_size */
332 OM_uint32 * /* max_input_size */
336 void *, /* context */
338 gss_OID, /* name type */
339 gss_OID, /* mech type */
345 /********************************************************/
346 /* Internal mechglue routines */
348 gss_mechanism __gss_get_mechanism
349 PROTOTYPE((gss_OID));
350 OM_uint32 __gss_get_mech_type
351 PROTOTYPE((gss_OID, gss_buffer_t));
352 OM_uint32 __gss_import_internal_name
353 PROTOTYPE((OM_uint32 *, gss_OID, gss_union_name_t,
355 OM_uint32 __gss_display_internal_name
356 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t,
357 gss_buffer_t, gss_OID *));
358 OM_uint32 __gss_release_internal_name
359 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t *));
361 OM_uint32 __gss_convert_name_to_union_name
362 PROTOTYPE((OM_uint32 *, /* minor_status */
363 gss_mechanism, /* mech */
364 gss_name_t, /* internal_name */
365 gss_name_t * /* external_name */
367 gss_cred_id_t __gss_get_mechanism_cred
368 PROTOTYPE((gss_union_cred_t, /* union_cred */
369 gss_OID /* mech_type */
372 OM_uint32 generic_gss_release_oid
373 PROTOTYPE( (OM_uint32 *, /* minor_status */
377 OM_uint32 generic_gss_copy_oid
378 PROTOTYPE( (OM_uint32 *, /* minor_status */
380 gss_OID * /* new_oid */
383 OM_uint32 generic_gss_create_empty_oid_set
384 PROTOTYPE( (OM_uint32 *, /* minor_status */
385 gss_OID_set * /* oid_set */
388 OM_uint32 generic_gss_add_oid_set_member
389 PROTOTYPE( (OM_uint32 *, /* minor_status */
390 gss_OID, /* member_oid */
391 gss_OID_set * /* oid_set */
394 OM_uint32 generic_gss_test_oid_set_member
395 PROTOTYPE( (OM_uint32 *, /* minor_status */
396 gss_OID, /* member */
397 gss_OID_set, /* set */
401 OM_uint32 generic_gss_oid_to_str
402 PROTOTYPE( (OM_uint32 *, /* minor_status */
404 gss_buffer_t /* oid_str */
407 OM_uint32 generic_gss_str_to_oid
408 PROTOTYPE( (OM_uint32 *, /* minor_status */
409 gss_buffer_t, /* oid_str */
414 gss_OID gss_find_mechanism_from_name_type
415 PROTOTYPE ( (gss_OID /* name_type */
418 OM_uint32 gss_add_mech_name_type
419 PROTOTYPE ( (OM_uint32 *, /* minor_status */
420 gss_OID, /* name_type */
424 #endif /* _GSS_MECHGLUEP_H */