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 * Array of names typed by the name OID (XXX - mechanism OID?)
26 typedef struct gss_union_name_t {
28 gss_buffer_t external_name;
29 } gss_union_name_desc, *gss_union_name_t;
32 * Credential auxiliary info, used in the credential structure
34 typedef struct gss_union_cred_auxinfo {
40 } gss_union_cred_auxinfo;
43 * Set of Credentials typed on mechanism OID
45 typedef struct gss_union_cred_t {
48 gss_cred_id_t * cred_array;
49 gss_union_cred_auxinfo auxinfo;
50 } gss_union_cred_desc, *gss_union_cred_t;
52 /********************************************************/
53 /* The Mechanism Dispatch Table -- a mechanism needs to */
54 /* define one of these and provide a function to return */
55 /* it to initialize the GSSAPI library */
58 * This is the definition of the mechs_array struct, which is used to
59 * define the mechs array table. This table is used to indirectly
60 * access mechanism specific versions of the gssapi routines through
61 * the routines in the glue module (gssd_mech_glue.c)
63 * This contants all of the functions defined in gssapi.h except for
64 * gss_release_buffer() and gss_release_oid_set(), which I am
65 * assuming, for now, to be equal across mechanisms.
68 typedef struct gss_config {
69 gss_OID_desc mech_type;
71 OM_uint32 (*gss_acquire_cred)
73 OM_uint32*, /* minor_status */
74 gss_name_t, /* desired_name */
75 OM_uint32, /* time_req */
76 gss_OID_set, /* desired_mechs */
78 gss_cred_id_t*, /* output_cred_handle */
79 gss_OID_set*, /* actual_mechs */
80 OM_uint32* /* time_rec */
82 OM_uint32 (*gss_release_cred)
84 OM_uint32*, /* minor_status */
85 gss_cred_id_t* /* cred_handle */
87 OM_uint32 (*gss_init_sec_context)
89 OM_uint32*, /* minor_status */
90 gss_cred_id_t, /* claimant_cred_handle */
91 gss_ctx_id_t*, /* context_handle */
92 gss_name_t, /* target_name */
93 gss_OID, /* mech_type */
95 OM_uint32, /* time_req */
96 gss_channel_bindings_t, /* input_chan_bindings */
97 gss_buffer_t, /* input_token */
98 gss_OID*, /* actual_mech_type */
99 gss_buffer_t, /* output_token */
100 int*, /* ret_flags */
101 OM_uint32* /* time_rec */
103 OM_uint32 (*gss_accept_sec_context)
104 (void*, /* context */
105 OM_uint32*, /* minor_status */
106 gss_ctx_id_t*, /* context_handle */
107 gss_cred_id_t, /* verifier_cred_handle */
108 gss_buffer_t, /* input_token_buffer */
109 gss_channel_bindings_t, /* input_chan_bindings */
110 gss_name_t*, /* src_name */
111 gss_OID*, /* mech_type */
112 gss_buffer_t, /* output_token */
113 int*, /* ret_flags */
114 OM_uint32*, /* time_rec */
115 gss_cred_id_t* /* delegated_cred_handle */
117 OM_uint32 (*gss_process_context_token)
118 (void*, /* context */
119 OM_uint32*, /* minor_status */
120 gss_ctx_id_t, /* context_handle */
121 gss_buffer_t /* token_buffer */
123 OM_uint32 (*gss_delete_sec_context)
124 (void*, /* context */
125 OM_uint32*, /* minor_status */
126 gss_ctx_id_t*, /* context_handle */
127 gss_buffer_t /* output_token */
129 OM_uint32 (*gss_context_time)
130 (void*, /* context */
131 OM_uint32*, /* minor_status */
132 gss_ctx_id_t, /* context_handle */
133 OM_uint32* /* time_rec */
135 OM_uint32 (*gss_sign)
136 (void*, /* context */
137 OM_uint32*, /* minor_status */
138 gss_ctx_id_t, /* context_handle */
140 gss_buffer_t, /* message_buffer */
141 gss_buffer_t /* message_token */
143 OM_uint32 (*gss_verify)
144 (void*, /* context */
145 OM_uint32*, /* minor_status */
146 gss_ctx_id_t, /* context_handle */
147 gss_buffer_t, /* message_buffer */
148 gss_buffer_t, /* token_buffer */
151 OM_uint32 (*gss_seal)
152 (void*, /* context */
153 OM_uint32*, /* minor_status */
154 gss_ctx_id_t, /* context_handle */
155 int, /* conf_req_flag */
157 gss_buffer_t, /* input_message_buffer */
158 int*, /* conf_state */
159 gss_buffer_t /* output_message_buffer */
161 OM_uint32 (*gss_unseal)
162 (void*, /* context */
163 OM_uint32*, /* minor_status */
164 gss_ctx_id_t, /* context_handle */
165 gss_buffer_t, /* input_message_buffer */
166 gss_buffer_t, /* output_message_buffer */
167 int*, /* conf_state */
170 OM_uint32 (*gss_display_status)
171 (void*, /* context */
172 OM_uint32*, /* minor_status */
173 OM_uint32, /* status_value */
174 int, /* status_type */
175 gss_OID, /* mech_type */
176 int*, /* message_context */
177 gss_buffer_t /* status_string */
179 OM_uint32 (*gss_indicate_mechs)
180 (void*, /* context */
181 OM_uint32*, /* minor_status */
182 gss_OID_set* /* mech_set */
184 OM_uint32 (*gss_compare_name)
185 (void*, /* context */
186 OM_uint32*, /* minor_status */
187 gss_name_t, /* name1 */
188 gss_name_t, /* name2 */
189 int* /* name_equal */
191 OM_uint32 (*gss_display_name)
192 (void*, /* context */
193 OM_uint32*, /* minor_status */
194 gss_name_t, /* input_name */
195 gss_buffer_t, /* output_name_buffer */
196 gss_OID* /* output_name_type */
198 OM_uint32 (*gss_import_name)
199 (void*, /* context */
200 OM_uint32*, /* minor_status */
201 gss_buffer_t, /* input_name_buffer */
202 gss_OID, /* input_name_type */
203 gss_name_t* /* output_name */
205 OM_uint32 (*gss_release_name)
206 (void*, /* context */
207 OM_uint32*, /* minor_status */
208 gss_name_t* /* input_name */
210 OM_uint32 (*gss_inquire_cred)
211 (void*, /* context */
212 OM_uint32 *, /* minor_status */
213 gss_cred_id_t, /* cred_handle */
214 gss_name_t *, /* name */
215 OM_uint32 *, /* lifetime */
216 int *, /* cred_usage */
217 gss_OID_set * /* mechanisms */
219 OM_uint32 (*gss_add_cred)
220 (void*, /* context */
221 OM_uint32 *, /* minor_status */
222 gss_cred_id_t, /* input_cred_handle */
223 gss_name_t, /* desired_name */
224 gss_OID, /* desired_mech */
225 gss_cred_usage_t, /* cred_usage */
226 OM_uint32, /* initiator_time_req */
227 OM_uint32, /* acceptor_time_req */
228 gss_cred_id_t *, /* output_cred_handle */
229 gss_OID_set *, /* actual_mechs */
230 OM_uint32 *, /* initiator_time_rec */
231 OM_uint32 * /* acceptor_time_rec */
233 OM_uint32 (*gss_export_sec_context)
234 (void*, /* context */
235 OM_uint32 *, /* minor_status */
236 gss_ctx_id_t *, /* context_handle */
237 gss_buffer_t /* interprocess_token */
239 OM_uint32 (*gss_import_sec_context)
240 (void *, /* context */
241 OM_uint32 *, /* minor_status */
242 gss_buffer_t, /* interprocess_token */
243 gss_ctx_id_t * /* context_handle */
245 OM_uint32 (*gss_inquire_cred_by_mech)
246 (void *, /* context */
247 OM_uint32 *, /* minor_status */
248 gss_cred_id_t, /* cred_handle */
249 gss_OID, /* mech_type */
250 gss_name_t *, /* name */
251 OM_uint32 *, /* initiator_lifetime */
252 OM_uint32 *, /* acceptor_lifetime */
253 gss_cred_usage_t * /* cred_usage */
255 OM_uint32 (*gss_inquire_names_for_mech)
256 (void *, /* context */
257 OM_uint32 *, /* minor_status */
258 gss_OID, /* mechanism */
259 gss_OID_set * /* name_types */
261 OM_uint32 (*gss_inquire_context)
262 (void *, /* context */
263 OM_uint32 *, /* minor_status */
264 gss_ctx_id_t, /* context_handle */
265 gss_name_t *, /* src_name */
266 gss_name_t *, /* targ_name */
267 OM_uint32 *, /* lifetime_rec */
268 gss_OID *, /* mech_type */
269 OM_uint32 *, /* ctx_flags */
270 int *, /* locally_initiated */
273 OM_uint32 (*gss_internal_release_oid)
274 (void *, /* context */
275 OM_uint32 *, /* minor_status */
280 gss_OID, /* name type */
281 gss_OID, /* mech type */
287 /********************************************************/
288 /* Internal mechglue routines */
290 gss_mechanism get_mechanism (gss_OID);
291 OM_uint32 add_mechanism (gss_mechanism, int);
292 OM_uint32 get_mech_type(gss_OID *, gss_buffer_t);
293 OM_uint32 import_internal_name (OM_uint32 *, gss_OID, gss_union_name_t,
295 OM_uint32 display_internal_name (OM_uint32 *, gss_OID, gss_name_t,
296 gss_buffer_t, gss_OID *);
297 OM_uint32 release_internal_name (OM_uint32 *, gss_OID, gss_name_t *);
299 OM_uint32 generic_gss_release_oid
300 PROTOTYPE( (OM_uint32 *, /* minor_status */
304 OM_uint32 generic_gss_create_empty_oid_set
305 PROTOTYPE( (OM_uint32 *, /* minor_status */
306 gss_OID_set * /* oid_set */
309 OM_uint32 generic_gss_add_oid_set_member
310 PROTOTYPE( (OM_uint32 *, /* minor_status */
311 gss_OID, /* member_oid */
312 gss_OID_set * /* oid_set */
315 OM_uint32 generic_gss_test_oid_set_member
316 PROTOTYPE( (OM_uint32 *, /* minor_status */
317 gss_OID, /* member */
318 gss_OID_set, /* set */
322 OM_uint32 generic_gss_oid_to_str
323 PROTOTYPE( (OM_uint32 *, /* minor_status */
325 gss_buffer_t /* oid_str */
328 OM_uint32 generic_gss_str_to_oid
329 PROTOTYPE( (OM_uint32 *, /* minor_status */
330 gss_buffer_t, /* oid_str */
336 #endif /* _GSS_MECHGLUEP_H */