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>
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 */
74 * This is the definition of the mechs_array struct, which is used to
75 * define the mechs array table. This table is used to indirectly
76 * access mechanism specific versions of the gssapi routines through
77 * the routines in the glue module (gssd_mech_glue.c)
79 * This contants all of the functions defined in gssapi.h except for
80 * gss_release_buffer() and gss_release_oid_set(), which I am
81 * assuming, for now, to be equal across mechanisms.
84 typedef struct gss_config {
85 gss_OID_desc mech_type;
87 OM_uint32 (*gss_acquire_cred)
90 OM_uint32*, /* minor_status */
91 gss_name_t, /* desired_name */
92 OM_uint32, /* time_req */
93 gss_OID_set, /* desired_mechs */
95 gss_cred_id_t*, /* output_cred_handle */
96 gss_OID_set*, /* actual_mechs */
97 OM_uint32* /* time_rec */
99 OM_uint32 (*gss_release_cred)
102 OM_uint32*, /* minor_status */
103 gss_cred_id_t* /* cred_handle */
105 OM_uint32 (*gss_init_sec_context)
108 OM_uint32*, /* minor_status */
109 gss_cred_id_t, /* claimant_cred_handle */
110 gss_ctx_id_t*, /* context_handle */
111 gss_name_t, /* target_name */
112 gss_OID, /* mech_type */
113 OM_uint32, /* req_flags */
114 OM_uint32, /* time_req */
115 gss_channel_bindings_t, /* input_chan_bindings */
116 gss_buffer_t, /* input_token */
117 gss_OID*, /* actual_mech_type */
118 gss_buffer_t, /* output_token */
119 OM_uint32*, /* ret_flags */
120 OM_uint32* /* time_rec */
122 OM_uint32 (*gss_accept_sec_context)
125 OM_uint32*, /* minor_status */
126 gss_ctx_id_t*, /* context_handle */
127 gss_cred_id_t, /* verifier_cred_handle */
128 gss_buffer_t, /* input_token_buffer */
129 gss_channel_bindings_t, /* input_chan_bindings */
130 gss_name_t*, /* src_name */
131 gss_OID*, /* mech_type */
132 gss_buffer_t, /* output_token */
133 OM_uint32*, /* ret_flags */
134 OM_uint32*, /* time_rec */
135 gss_cred_id_t* /* delegated_cred_handle */
137 OM_uint32 (*gss_process_context_token)
140 OM_uint32*, /* minor_status */
141 gss_ctx_id_t, /* context_handle */
142 gss_buffer_t /* token_buffer */
144 OM_uint32 (*gss_delete_sec_context)
147 OM_uint32*, /* minor_status */
148 gss_ctx_id_t*, /* context_handle */
149 gss_buffer_t /* output_token */
151 OM_uint32 (*gss_context_time)
154 OM_uint32*, /* minor_status */
155 gss_ctx_id_t, /* context_handle */
156 OM_uint32* /* time_rec */
158 OM_uint32 (*gss_sign)
161 OM_uint32*, /* minor_status */
162 gss_ctx_id_t, /* context_handle */
164 gss_buffer_t, /* message_buffer */
165 gss_buffer_t /* message_token */
167 OM_uint32 (*gss_verify)
170 OM_uint32*, /* minor_status */
171 gss_ctx_id_t, /* context_handle */
172 gss_buffer_t, /* message_buffer */
173 gss_buffer_t, /* token_buffer */
176 OM_uint32 (*gss_seal)
179 OM_uint32*, /* minor_status */
180 gss_ctx_id_t, /* context_handle */
181 int, /* conf_req_flag */
183 gss_buffer_t, /* input_message_buffer */
184 int*, /* conf_state */
185 gss_buffer_t /* output_message_buffer */
187 OM_uint32 (*gss_unseal)
190 OM_uint32*, /* minor_status */
191 gss_ctx_id_t, /* context_handle */
192 gss_buffer_t, /* input_message_buffer */
193 gss_buffer_t, /* output_message_buffer */
194 int*, /* conf_state */
197 OM_uint32 (*gss_display_status)
200 OM_uint32*, /* minor_status */
201 OM_uint32, /* status_value */
202 int, /* status_type */
203 gss_OID, /* mech_type */
204 OM_uint32*, /* message_context */
205 gss_buffer_t /* status_string */
207 OM_uint32 (*gss_indicate_mechs)
210 OM_uint32*, /* minor_status */
211 gss_OID_set* /* mech_set */
213 OM_uint32 (*gss_compare_name)
216 OM_uint32*, /* minor_status */
217 gss_name_t, /* name1 */
218 gss_name_t, /* name2 */
219 int* /* name_equal */
221 OM_uint32 (*gss_display_name)
224 OM_uint32*, /* minor_status */
225 gss_name_t, /* input_name */
226 gss_buffer_t, /* output_name_buffer */
227 gss_OID* /* output_name_type */
229 OM_uint32 (*gss_import_name)
232 OM_uint32*, /* minor_status */
233 gss_buffer_t, /* input_name_buffer */
234 gss_OID, /* input_name_type */
235 gss_name_t* /* output_name */
237 OM_uint32 (*gss_release_name)
240 OM_uint32*, /* minor_status */
241 gss_name_t* /* input_name */
243 OM_uint32 (*gss_inquire_cred)
246 OM_uint32 *, /* minor_status */
247 gss_cred_id_t, /* cred_handle */
248 gss_name_t *, /* name */
249 OM_uint32 *, /* lifetime */
250 int *, /* cred_usage */
251 gss_OID_set * /* mechanisms */
253 OM_uint32 (*gss_add_cred)
256 OM_uint32 *, /* minor_status */
257 gss_cred_id_t, /* input_cred_handle */
258 gss_name_t, /* desired_name */
259 gss_OID, /* desired_mech */
260 gss_cred_usage_t, /* cred_usage */
261 OM_uint32, /* initiator_time_req */
262 OM_uint32, /* acceptor_time_req */
263 gss_cred_id_t *, /* output_cred_handle */
264 gss_OID_set *, /* actual_mechs */
265 OM_uint32 *, /* initiator_time_rec */
266 OM_uint32 * /* acceptor_time_rec */
268 OM_uint32 (*gss_export_sec_context)
271 OM_uint32 *, /* minor_status */
272 gss_ctx_id_t *, /* context_handle */
273 gss_buffer_t /* interprocess_token */
275 OM_uint32 (*gss_import_sec_context)
277 void *, /* context */
278 OM_uint32 *, /* minor_status */
279 gss_buffer_t, /* interprocess_token */
280 gss_ctx_id_t * /* context_handle */
282 OM_uint32 (*gss_inquire_cred_by_mech)
284 void *, /* context */
285 OM_uint32 *, /* minor_status */
286 gss_cred_id_t, /* cred_handle */
287 gss_OID, /* mech_type */
288 gss_name_t *, /* name */
289 OM_uint32 *, /* initiator_lifetime */
290 OM_uint32 *, /* acceptor_lifetime */
291 gss_cred_usage_t * /* cred_usage */
293 OM_uint32 (*gss_inquire_names_for_mech)
295 void *, /* context */
296 OM_uint32 *, /* minor_status */
297 gss_OID, /* mechanism */
298 gss_OID_set * /* name_types */
300 OM_uint32 (*gss_inquire_context)
302 void *, /* context */
303 OM_uint32 *, /* minor_status */
304 gss_ctx_id_t, /* context_handle */
305 gss_name_t *, /* src_name */
306 gss_name_t *, /* targ_name */
307 OM_uint32 *, /* lifetime_rec */
308 gss_OID *, /* mech_type */
309 OM_uint32 *, /* ctx_flags */
310 int *, /* locally_initiated */
313 OM_uint32 (*gss_internal_release_oid)
315 void *, /* context */
316 OM_uint32 *, /* minor_status */
319 OM_uint32 (*gss_wrap_size_limit)
321 void *, /* context */
322 OM_uint32 *, /* minor_status */
323 gss_ctx_id_t, /* context_handle */
324 int, /* conf_req_flag */
325 gss_qop_t, /* qop_req */
326 OM_uint32, /* req_output_size */
327 OM_uint32 * /* max_input_size */
331 void *, /* context */
333 gss_OID, /* name type */
334 gss_OID, /* mech type */
340 /********************************************************/
341 /* Internal mechglue routines */
343 gss_mechanism __gss_get_mechanism
344 PROTOTYPE((gss_OID));
345 OM_uint32 __gss_get_mech_type
346 PROTOTYPE((gss_OID *, gss_buffer_t));
347 OM_uint32 __gss_import_internal_name
348 PROTOTYPE((OM_uint32 *, gss_OID, gss_union_name_t,
350 OM_uint32 __gss_display_internal_name
351 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t,
352 gss_buffer_t, gss_OID *));
353 OM_uint32 __gss_release_internal_name
354 PROTOTYPE((OM_uint32 *, gss_OID, gss_name_t *));
356 OM_uint32 __gss_convert_name_to_union_name
357 PROTOTYPE((OM_uint32 *, /* minor_status */
358 gss_mechanism, /* mech */
359 gss_name_t, /* internal_name */
360 gss_name_t * /* external_name */
362 gss_cred_id_t __gss_get_mechanism_cred
363 PROTOTYPE((gss_union_cred_t, /* union_cred */
364 gss_OID /* mech_type */
367 OM_uint32 generic_gss_release_oid
368 PROTOTYPE( (OM_uint32 *, /* minor_status */
372 OM_uint32 generic_gss_copy_oid
373 PROTOTYPE( (OM_uint32 *, /* minor_status */
375 gss_OID * /* new_oid */
378 OM_uint32 generic_gss_create_empty_oid_set
379 PROTOTYPE( (OM_uint32 *, /* minor_status */
380 gss_OID_set * /* oid_set */
383 OM_uint32 generic_gss_add_oid_set_member
384 PROTOTYPE( (OM_uint32 *, /* minor_status */
385 gss_OID, /* member_oid */
386 gss_OID_set * /* oid_set */
389 OM_uint32 generic_gss_test_oid_set_member
390 PROTOTYPE( (OM_uint32 *, /* minor_status */
391 gss_OID, /* member */
392 gss_OID_set, /* set */
396 OM_uint32 generic_gss_oid_to_str
397 PROTOTYPE( (OM_uint32 *, /* minor_status */
399 gss_buffer_t /* oid_str */
402 OM_uint32 generic_gss_str_to_oid
403 PROTOTYPE( (OM_uint32 *, /* minor_status */
404 gss_buffer_t, /* oid_str */
409 gss_OID gss_find_mechanism_from_name_type
410 PROTOTYPE ( (gss_OID /* name_type */
413 OM_uint32 gss_add_mech_name_type
414 PROTOTYPE ( (OM_uint32 *, /* minor_status */
415 gss_OID, /* name_type */
419 #endif /* _GSS_MECHGLUEP_H */