|
1 /* vim:set ts=4 sw=4 sts=4 et cindent: */ |
|
2 /* ***** BEGIN LICENSE BLOCK ***** |
|
3 * Copyright 1993 by OpenVision Technologies, Inc. |
|
4 * |
|
5 * Permission to use, copy, modify, distribute, and sell this software |
|
6 * and its documentation for any purpose is hereby granted without fee, |
|
7 * provided that the above copyright notice appears in all copies and |
|
8 * that both that copyright notice and this permission notice appear in |
|
9 * supporting documentation, and that the name of OpenVision not be used |
|
10 * in advertising or publicity pertaining to distribution of the software |
|
11 * without specific, written prior permission. OpenVision makes no |
|
12 * representations about the suitability of this software for any |
|
13 * purpose. It is provided "as is" without express or implied warranty. |
|
14 * |
|
15 * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
|
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
|
17 * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
|
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF |
|
19 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
|
20 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
21 * PERFORMANCE OF THIS SOFTWARE. |
|
22 ****** END LICENSE BLOCK ***** */ |
|
23 |
|
24 #ifndef GSSAPI_H_ |
|
25 #define GSSAPI_H_ |
|
26 |
|
27 /* |
|
28 * Also define _GSSAPI_H_ as that is what the Kerberos 5 code defines and |
|
29 * what header files on some systems look for. |
|
30 */ |
|
31 #define _GSSAPI_H_ |
|
32 |
|
33 /* |
|
34 * On Mac OS X, Kerberos/Kerberos.h is used to gain access to certain |
|
35 * system-specific Kerberos functions, but on 10.4, that file also brings |
|
36 * in other headers that conflict with this one. |
|
37 */ |
|
38 #define _GSSAPI_GENERIC_H_ |
|
39 #define _GSSAPI_KRB5_H_ |
|
40 |
|
41 /* |
|
42 * Define windows specific needed parameters. |
|
43 */ |
|
44 |
|
45 #ifndef GSS_CALLCONV |
|
46 #if defined(_WIN32) |
|
47 #define GSS_CALLCONV __stdcall |
|
48 #define GSS_CALLCONV_C __cdecl |
|
49 #else |
|
50 #define GSS_CALLCONV |
|
51 #define GSS_CALLCONV_C |
|
52 #endif |
|
53 #endif /* GSS_CALLCONV */ |
|
54 |
|
55 #ifdef GSS_USE_FUNCTION_POINTERS |
|
56 #ifdef _WIN32 |
|
57 #undef GSS_CALLCONV |
|
58 #define GSS_CALLCONV |
|
59 #define GSS_FUNC(f) (__stdcall *f##_type) |
|
60 #else |
|
61 #define GSS_FUNC(f) (*f##_type) |
|
62 #endif |
|
63 #define GSS_MAKE_TYPEDEF typedef |
|
64 #else |
|
65 #define GSS_FUNC(f) f |
|
66 #define GSS_MAKE_TYPEDEF |
|
67 #endif |
|
68 |
|
69 /* |
|
70 * First, include stddef.h to get size_t defined. |
|
71 */ |
|
72 #include <stddef.h> |
|
73 |
|
74 /* |
|
75 * Configure set the following |
|
76 */ |
|
77 |
|
78 #ifndef SIZEOF_LONG |
|
79 #undef SIZEOF_LONG |
|
80 #endif |
|
81 #ifndef SIZEOF_SHORT |
|
82 #undef SIZEOF_SHORT |
|
83 #endif |
|
84 |
|
85 #ifndef EXTERN_C_BEGIN |
|
86 #ifdef __cplusplus |
|
87 #define EXTERN_C_BEGIN extern "C" { |
|
88 #define EXTERN_C_END } |
|
89 #else |
|
90 #define EXTERN_C_BEGIN |
|
91 #define EXTERN_C_END |
|
92 #endif |
|
93 #endif |
|
94 |
|
95 EXTERN_C_BEGIN |
|
96 |
|
97 #if defined(XP_MACOSX) |
|
98 # pragma pack(push,2) |
|
99 #endif |
|
100 |
|
101 /* |
|
102 * If the platform supports the xom.h header file, it should be |
|
103 * included here. |
|
104 */ |
|
105 /* #include <xom.h> */ |
|
106 |
|
107 |
|
108 /* |
|
109 * Now define the three implementation-dependent types. |
|
110 */ |
|
111 |
|
112 typedef void * gss_name_t ; |
|
113 typedef void * gss_ctx_id_t ; |
|
114 typedef void * gss_cred_id_t ; |
|
115 |
|
116 |
|
117 /* |
|
118 * The following type must be defined as the smallest natural |
|
119 * unsigned integer supported by the platform that has at least |
|
120 * 32 bits of precision. |
|
121 */ |
|
122 |
|
123 #if SIZEOF_LONG == 4 |
|
124 typedef unsigned long gss_uint32; |
|
125 #elif SIZEOF_SHORT == 4 |
|
126 typedef unsigned short gss_uint32; |
|
127 #else |
|
128 typedef unsigned int gss_uint32; |
|
129 #endif |
|
130 |
|
131 #ifdef OM_STRING |
|
132 |
|
133 /* |
|
134 * We have included the xom.h header file. Verify that OM_uint32 |
|
135 * is defined correctly. |
|
136 */ |
|
137 |
|
138 #if sizeof(gss_uint32) != sizeof(OM_uint32) |
|
139 #error Incompatible definition of OM_uint32 from xom.h |
|
140 #endif |
|
141 |
|
142 typedef OM_object_identifier gss_OID_desc, *gss_OID; |
|
143 |
|
144 #else /* !OM_STRING */ |
|
145 |
|
146 /* |
|
147 * We can't use X/Open definitions, so roll our own. |
|
148 */ |
|
149 typedef gss_uint32 OM_uint32; |
|
150 typedef struct gss_OID_desc_struct { |
|
151 OM_uint32 length; |
|
152 void *elements; |
|
153 } gss_OID_desc, *gss_OID; |
|
154 |
|
155 #endif /* !OM_STRING */ |
|
156 |
|
157 typedef struct gss_OID_set_desc_struct { |
|
158 size_t count; |
|
159 gss_OID elements; |
|
160 } gss_OID_set_desc, *gss_OID_set; |
|
161 |
|
162 |
|
163 /* |
|
164 * For now, define a QOP-type as an OM_uint32 |
|
165 */ |
|
166 typedef OM_uint32 gss_qop_t; |
|
167 |
|
168 typedef int gss_cred_usage_t; |
|
169 |
|
170 |
|
171 typedef struct gss_buffer_desc_struct { |
|
172 size_t length; |
|
173 void *value; |
|
174 } gss_buffer_desc, *gss_buffer_t; |
|
175 |
|
176 typedef struct gss_channel_bindings_struct { |
|
177 OM_uint32 initiator_addrtype; |
|
178 gss_buffer_desc initiator_address; |
|
179 OM_uint32 acceptor_addrtype; |
|
180 gss_buffer_desc acceptor_address; |
|
181 gss_buffer_desc application_data; |
|
182 } *gss_channel_bindings_t; |
|
183 |
|
184 |
|
185 /* |
|
186 * Flag bits for context-level services. |
|
187 */ |
|
188 #define GSS_C_DELEG_FLAG 1 |
|
189 #define GSS_C_MUTUAL_FLAG 2 |
|
190 #define GSS_C_REPLAY_FLAG 4 |
|
191 #define GSS_C_SEQUENCE_FLAG 8 |
|
192 #define GSS_C_CONF_FLAG 16 |
|
193 #define GSS_C_INTEG_FLAG 32 |
|
194 #define GSS_C_ANON_FLAG 64 |
|
195 #define GSS_C_PROT_READY_FLAG 128 |
|
196 #define GSS_C_TRANS_FLAG 256 |
|
197 |
|
198 /* |
|
199 * Credential usage options |
|
200 */ |
|
201 #define GSS_C_BOTH 0 |
|
202 #define GSS_C_INITIATE 1 |
|
203 #define GSS_C_ACCEPT 2 |
|
204 |
|
205 /* |
|
206 * Status code types for gss_display_status |
|
207 */ |
|
208 #define GSS_C_GSS_CODE 1 |
|
209 #define GSS_C_MECH_CODE 2 |
|
210 |
|
211 /* |
|
212 * The constant definitions for channel-bindings address families |
|
213 */ |
|
214 #define GSS_C_AF_UNSPEC 0 |
|
215 #define GSS_C_AF_LOCAL 1 |
|
216 #define GSS_C_AF_INET 2 |
|
217 #define GSS_C_AF_IMPLINK 3 |
|
218 #define GSS_C_AF_PUP 4 |
|
219 #define GSS_C_AF_CHAOS 5 |
|
220 #define GSS_C_AF_NS 6 |
|
221 #define GSS_C_AF_NBS 7 |
|
222 #define GSS_C_AF_ECMA 8 |
|
223 #define GSS_C_AF_DATAKIT 9 |
|
224 #define GSS_C_AF_CCITT 10 |
|
225 #define GSS_C_AF_SNA 11 |
|
226 #define GSS_C_AF_DECnet 12 |
|
227 #define GSS_C_AF_DLI 13 |
|
228 #define GSS_C_AF_LAT 14 |
|
229 #define GSS_C_AF_HYLINK 15 |
|
230 #define GSS_C_AF_APPLETALK 16 |
|
231 #define GSS_C_AF_BSC 17 |
|
232 #define GSS_C_AF_DSS 18 |
|
233 #define GSS_C_AF_OSI 19 |
|
234 #define GSS_C_AF_X25 21 |
|
235 |
|
236 #define GSS_C_AF_NULLADDR 255 |
|
237 |
|
238 /* |
|
239 * Various Null values |
|
240 */ |
|
241 #define GSS_C_NO_NAME ((gss_name_t) 0) |
|
242 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0) |
|
243 #define GSS_C_NO_OID ((gss_OID) 0) |
|
244 #define GSS_C_NO_OID_SET ((gss_OID_set) 0) |
|
245 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) |
|
246 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) |
|
247 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) |
|
248 #define GSS_C_EMPTY_BUFFER {0, nullptr} |
|
249 |
|
250 /* |
|
251 * Some alternate names for a couple of the above |
|
252 * values. These are defined for V1 compatibility. |
|
253 */ |
|
254 #define GSS_C_NULL_OID GSS_C_NO_OID |
|
255 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET |
|
256 |
|
257 /* |
|
258 * Define the default Quality of Protection for per-message |
|
259 * services. Note that an implementation that offers multiple |
|
260 * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero |
|
261 * (as done here) to mean "default protection", or to a specific |
|
262 * explicit QOP value. However, a value of 0 should always be |
|
263 * interpreted by a GSSAPI implementation as a request for the |
|
264 * default protection level. |
|
265 */ |
|
266 #define GSS_C_QOP_DEFAULT 0 |
|
267 |
|
268 /* |
|
269 * Expiration time of 2^32-1 seconds means infinite lifetime for a |
|
270 * credential or security context |
|
271 */ |
|
272 #define GSS_C_INDEFINITE 0xfffffffful |
|
273 |
|
274 /* |
|
275 * The implementation must reserve static storage for a |
|
276 * gss_OID_desc object containing the value |
|
277 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" |
|
278 * "\x01\x02\x01\x01"}, |
|
279 * corresponding to an object-identifier value of |
|
280 * {iso(1) member-body(2) United States(840) mit(113554) |
|
281 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant |
|
282 * GSS_C_NT_USER_NAME should be initialized to point |
|
283 * to that gss_OID_desc. |
|
284 */ |
|
285 extern gss_OID GSS_C_NT_USER_NAME; |
|
286 |
|
287 /* |
|
288 * The implementation must reserve static storage for a |
|
289 * gss_OID_desc object containing the value |
|
290 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" |
|
291 * "\x01\x02\x01\x02"}, |
|
292 * corresponding to an object-identifier value of |
|
293 * {iso(1) member-body(2) United States(840) mit(113554) |
|
294 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. |
|
295 * The constant GSS_C_NT_MACHINE_UID_NAME should be |
|
296 * initialized to point to that gss_OID_desc. |
|
297 */ |
|
298 extern gss_OID GSS_C_NT_MACHINE_UID_NAME; |
|
299 |
|
300 /* |
|
301 * The implementation must reserve static storage for a |
|
302 * gss_OID_desc object containing the value |
|
303 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" |
|
304 * "\x01\x02\x01\x03"}, |
|
305 * corresponding to an object-identifier value of |
|
306 * {iso(1) member-body(2) United States(840) mit(113554) |
|
307 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. |
|
308 * The constant GSS_C_NT_STRING_UID_NAME should be |
|
309 * initialized to point to that gss_OID_desc. |
|
310 */ |
|
311 extern gss_OID GSS_C_NT_STRING_UID_NAME; |
|
312 |
|
313 /* |
|
314 * The implementation must reserve static storage for a |
|
315 * gss_OID_desc object containing the value |
|
316 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, |
|
317 * corresponding to an object-identifier value of |
|
318 * {iso(1) org(3) dod(6) internet(1) security(5) |
|
319 * nametypes(6) gss-host-based-services(2)). The constant |
|
320 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point |
|
321 * to that gss_OID_desc. This is a deprecated OID value, and |
|
322 * implementations wishing to support hostbased-service names |
|
323 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, |
|
324 * defined below, to identify such names; |
|
325 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym |
|
326 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input |
|
327 * parameter, but should not be emitted by GSSAPI |
|
328 * implementations |
|
329 */ |
|
330 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X; |
|
331 |
|
332 /* |
|
333 * The implementation must reserve static storage for a |
|
334 * gss_OID_desc object containing the value |
|
335 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" |
|
336 * "\x01\x02\x01\x04"}, corresponding to an |
|
337 * object-identifier value of {iso(1) member-body(2) |
|
338 * Unites States(840) mit(113554) infosys(1) gssapi(2) |
|
339 * generic(1) service_name(4)}. The constant |
|
340 * GSS_C_NT_HOSTBASED_SERVICE should be initialized |
|
341 * to point to that gss_OID_desc. |
|
342 */ |
|
343 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE; |
|
344 |
|
345 |
|
346 /* |
|
347 * The implementation must reserve static storage for a |
|
348 * gss_OID_desc object containing the value |
|
349 * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, |
|
350 * corresponding to an object identifier value of |
|
351 * {1(iso), 3(org), 6(dod), 1(internet), 5(security), |
|
352 * 6(nametypes), 3(gss-anonymous-name)}. The constant |
|
353 * and GSS_C_NT_ANONYMOUS should be initialized to point |
|
354 * to that gss_OID_desc. |
|
355 */ |
|
356 extern gss_OID GSS_C_NT_ANONYMOUS; |
|
357 |
|
358 /* |
|
359 * The implementation must reserve static storage for a |
|
360 * gss_OID_desc object containing the value |
|
361 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, |
|
362 * corresponding to an object-identifier value of |
|
363 * {1(iso), 3(org), 6(dod), 1(internet), 5(security), |
|
364 * 6(nametypes), 4(gss-api-exported-name)}. The constant |
|
365 * GSS_C_NT_EXPORT_NAME should be initialized to point |
|
366 * to that gss_OID_desc. |
|
367 */ |
|
368 extern gss_OID GSS_C_NT_EXPORT_NAME; |
|
369 |
|
370 /* Major status codes */ |
|
371 |
|
372 #define GSS_S_COMPLETE 0 |
|
373 |
|
374 /* |
|
375 * Some "helper" definitions to make the status code macros obvious. |
|
376 */ |
|
377 #define GSS_C_CALLING_ERROR_OFFSET 24 |
|
378 #define GSS_C_ROUTINE_ERROR_OFFSET 16 |
|
379 #define GSS_C_SUPPLEMENTARY_OFFSET 0 |
|
380 #define GSS_C_CALLING_ERROR_MASK 0377ul |
|
381 #define GSS_C_ROUTINE_ERROR_MASK 0377ul |
|
382 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul |
|
383 |
|
384 /* |
|
385 * The macros that test status codes for error conditions. |
|
386 * Note that the GSS_ERROR() macro has changed slightly from |
|
387 * the V1 GSSAPI so that it now evaluates its argument |
|
388 * only once. |
|
389 */ |
|
390 #define GSS_CALLING_ERROR(x) \ |
|
391 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) |
|
392 #define GSS_ROUTINE_ERROR(x) \ |
|
393 (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) |
|
394 #define GSS_SUPPLEMENTARY_INFO(x) \ |
|
395 (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) |
|
396 #define GSS_ERROR(x) \ |
|
397 (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ |
|
398 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) |
|
399 |
|
400 /* |
|
401 * Now the actual status code definitions |
|
402 */ |
|
403 |
|
404 /* |
|
405 * Calling errors: |
|
406 */ |
|
407 #define GSS_S_CALL_INACCESSIBLE_READ \ |
|
408 (1ul << GSS_C_CALLING_ERROR_OFFSET) |
|
409 #define GSS_S_CALL_INACCESSIBLE_WRITE \ |
|
410 (2ul << GSS_C_CALLING_ERROR_OFFSET) |
|
411 #define GSS_S_CALL_BAD_STRUCTURE \ |
|
412 (3ul << GSS_C_CALLING_ERROR_OFFSET) |
|
413 |
|
414 /* |
|
415 * Routine errors: |
|
416 */ |
|
417 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
418 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
419 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
420 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
421 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
422 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
423 #define GSS_S_BAD_MIC GSS_S_BAD_SIG |
|
424 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
425 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
426 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
427 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
428 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
429 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
430 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
431 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
432 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
433 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
434 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
435 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET) |
|
436 |
|
437 /* |
|
438 * Supplementary info bits: |
|
439 */ |
|
440 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) |
|
441 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) |
|
442 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) |
|
443 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) |
|
444 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) |
|
445 |
|
446 /* |
|
447 * Finally, function prototypes for the GSS-API routines. |
|
448 */ |
|
449 |
|
450 GSS_MAKE_TYPEDEF |
|
451 OM_uint32 |
|
452 GSS_CALLCONV GSS_FUNC(gss_acquire_cred) |
|
453 (OM_uint32 *, /* minor_status */ |
|
454 const gss_name_t, /* desired_name */ |
|
455 OM_uint32, /* time_req */ |
|
456 const gss_OID_set, /* desired_mechs */ |
|
457 gss_cred_usage_t, /* cred_usage */ |
|
458 gss_cred_id_t *, /* output_cred_handle */ |
|
459 gss_OID_set *, /* actual_mechs */ |
|
460 OM_uint32 * /* time_rec */ |
|
461 ); |
|
462 |
|
463 GSS_MAKE_TYPEDEF |
|
464 OM_uint32 |
|
465 GSS_CALLCONV GSS_FUNC(gss_release_cred) |
|
466 (OM_uint32 *, /* minor_status */ |
|
467 gss_cred_id_t * /* cred_handle */ |
|
468 ); |
|
469 |
|
470 GSS_MAKE_TYPEDEF |
|
471 OM_uint32 |
|
472 GSS_CALLCONV GSS_FUNC(gss_init_sec_context) |
|
473 (OM_uint32 *, /* minor_status */ |
|
474 const gss_cred_id_t, /* initiator_cred_handle */ |
|
475 gss_ctx_id_t *, /* context_handle */ |
|
476 const gss_name_t, /* target_name */ |
|
477 const gss_OID, /* mech_type */ |
|
478 OM_uint32, /* req_flags */ |
|
479 OM_uint32, /* time_req */ |
|
480 const gss_channel_bindings_t, /* input_chan_bindings */ |
|
481 const gss_buffer_t, /* input_token */ |
|
482 gss_OID *, /* actual_mech_type */ |
|
483 gss_buffer_t, /* output_token */ |
|
484 OM_uint32 *, /* ret_flags */ |
|
485 OM_uint32 * /* time_rec */ |
|
486 ); |
|
487 |
|
488 GSS_MAKE_TYPEDEF |
|
489 OM_uint32 |
|
490 GSS_CALLCONV GSS_FUNC(gss_accept_sec_context) |
|
491 (OM_uint32 *, /* minor_status */ |
|
492 gss_ctx_id_t *, /* context_handle */ |
|
493 const gss_cred_id_t, /* acceptor_cred_handle */ |
|
494 const gss_buffer_t, /* input_token_buffer */ |
|
495 const gss_channel_bindings_t, /* input_chan_bindings */ |
|
496 gss_name_t *, /* src_name */ |
|
497 gss_OID *, /* mech_type */ |
|
498 gss_buffer_t, /* output_token */ |
|
499 OM_uint32 *, /* ret_flags */ |
|
500 OM_uint32 *, /* time_rec */ |
|
501 gss_cred_id_t * /* delegated_cred_handle */ |
|
502 ); |
|
503 |
|
504 GSS_MAKE_TYPEDEF |
|
505 OM_uint32 |
|
506 GSS_CALLCONV GSS_FUNC(gss_process_context_token) |
|
507 (OM_uint32 *, /* minor_status */ |
|
508 const gss_ctx_id_t, /* context_handle */ |
|
509 const gss_buffer_t /* token_buffer */ |
|
510 ); |
|
511 |
|
512 GSS_MAKE_TYPEDEF |
|
513 OM_uint32 |
|
514 GSS_CALLCONV GSS_FUNC(gss_delete_sec_context) |
|
515 (OM_uint32 *, /* minor_status */ |
|
516 gss_ctx_id_t *, /* context_handle */ |
|
517 gss_buffer_t /* output_token */ |
|
518 ); |
|
519 |
|
520 GSS_MAKE_TYPEDEF |
|
521 OM_uint32 |
|
522 GSS_CALLCONV GSS_FUNC(gss_context_time) |
|
523 (OM_uint32 *, /* minor_status */ |
|
524 const gss_ctx_id_t, /* context_handle */ |
|
525 OM_uint32 * /* time_rec */ |
|
526 ); |
|
527 |
|
528 GSS_MAKE_TYPEDEF |
|
529 OM_uint32 |
|
530 GSS_CALLCONV GSS_FUNC(gss_get_mic) |
|
531 (OM_uint32 *, /* minor_status */ |
|
532 const gss_ctx_id_t, /* context_handle */ |
|
533 gss_qop_t, /* qop_req */ |
|
534 const gss_buffer_t, /* message_buffer */ |
|
535 gss_buffer_t /* message_token */ |
|
536 ); |
|
537 |
|
538 |
|
539 GSS_MAKE_TYPEDEF |
|
540 OM_uint32 |
|
541 GSS_CALLCONV GSS_FUNC(gss_verify_mic) |
|
542 (OM_uint32 *, /* minor_status */ |
|
543 const gss_ctx_id_t, /* context_handle */ |
|
544 const gss_buffer_t, /* message_buffer */ |
|
545 const gss_buffer_t, /* token_buffer */ |
|
546 gss_qop_t * /* qop_state */ |
|
547 ); |
|
548 |
|
549 GSS_MAKE_TYPEDEF |
|
550 OM_uint32 |
|
551 GSS_CALLCONV GSS_FUNC(gss_wrap) |
|
552 (OM_uint32 *, /* minor_status */ |
|
553 const gss_ctx_id_t, /* context_handle */ |
|
554 int, /* conf_req_flag */ |
|
555 gss_qop_t, /* qop_req */ |
|
556 const gss_buffer_t, /* input_message_buffer */ |
|
557 int *, /* conf_state */ |
|
558 gss_buffer_t /* output_message_buffer */ |
|
559 ); |
|
560 |
|
561 |
|
562 GSS_MAKE_TYPEDEF |
|
563 OM_uint32 |
|
564 GSS_CALLCONV GSS_FUNC(gss_unwrap) |
|
565 (OM_uint32 *, /* minor_status */ |
|
566 const gss_ctx_id_t, /* context_handle */ |
|
567 const gss_buffer_t, /* input_message_buffer */ |
|
568 gss_buffer_t, /* output_message_buffer */ |
|
569 int *, /* conf_state */ |
|
570 gss_qop_t * /* qop_state */ |
|
571 ); |
|
572 |
|
573 GSS_MAKE_TYPEDEF |
|
574 OM_uint32 |
|
575 GSS_CALLCONV GSS_FUNC(gss_display_status) |
|
576 (OM_uint32 *, /* minor_status */ |
|
577 OM_uint32, /* status_value */ |
|
578 int, /* status_type */ |
|
579 const gss_OID, /* mech_type */ |
|
580 OM_uint32 *, /* message_context */ |
|
581 gss_buffer_t /* status_string */ |
|
582 ); |
|
583 |
|
584 GSS_MAKE_TYPEDEF |
|
585 OM_uint32 |
|
586 GSS_CALLCONV GSS_FUNC(gss_indicate_mechs) |
|
587 (OM_uint32 *, /* minor_status */ |
|
588 gss_OID_set * /* mech_set */ |
|
589 ); |
|
590 |
|
591 GSS_MAKE_TYPEDEF |
|
592 OM_uint32 |
|
593 GSS_CALLCONV GSS_FUNC(gss_compare_name) |
|
594 (OM_uint32 *, /* minor_status */ |
|
595 const gss_name_t, /* name1 */ |
|
596 const gss_name_t, /* name2 */ |
|
597 int * /* name_equal */ |
|
598 ); |
|
599 |
|
600 GSS_MAKE_TYPEDEF |
|
601 OM_uint32 |
|
602 GSS_CALLCONV GSS_FUNC(gss_display_name) |
|
603 (OM_uint32 *, /* minor_status */ |
|
604 const gss_name_t, /* input_name */ |
|
605 gss_buffer_t, /* output_name_buffer */ |
|
606 gss_OID * /* output_name_type */ |
|
607 ); |
|
608 |
|
609 GSS_MAKE_TYPEDEF |
|
610 OM_uint32 |
|
611 GSS_CALLCONV GSS_FUNC(gss_import_name) |
|
612 (OM_uint32 *, /* minor_status */ |
|
613 const gss_buffer_t, /* input_name_buffer */ |
|
614 const gss_OID, /* input_name_type */ |
|
615 gss_name_t * /* output_name */ |
|
616 ); |
|
617 |
|
618 GSS_MAKE_TYPEDEF |
|
619 OM_uint32 |
|
620 GSS_CALLCONV GSS_FUNC(gss_export_name) |
|
621 (OM_uint32 *, /* minor_status */ |
|
622 const gss_name_t, /* input_name */ |
|
623 gss_buffer_t /* exported_name */ |
|
624 ); |
|
625 |
|
626 GSS_MAKE_TYPEDEF |
|
627 OM_uint32 |
|
628 GSS_CALLCONV GSS_FUNC(gss_release_name) |
|
629 (OM_uint32 *, /* minor_status */ |
|
630 gss_name_t * /* input_name */ |
|
631 ); |
|
632 |
|
633 GSS_MAKE_TYPEDEF |
|
634 OM_uint32 |
|
635 GSS_CALLCONV GSS_FUNC(gss_release_buffer) |
|
636 (OM_uint32 *, /* minor_status */ |
|
637 gss_buffer_t /* buffer */ |
|
638 ); |
|
639 |
|
640 GSS_MAKE_TYPEDEF |
|
641 OM_uint32 |
|
642 GSS_CALLCONV GSS_FUNC(gss_release_oid_set) |
|
643 (OM_uint32 *, /* minor_status */ |
|
644 gss_OID_set * /* set */ |
|
645 ); |
|
646 |
|
647 GSS_MAKE_TYPEDEF |
|
648 OM_uint32 |
|
649 GSS_CALLCONV GSS_FUNC(gss_inquire_cred) |
|
650 (OM_uint32 *, /* minor_status */ |
|
651 const gss_cred_id_t, /* cred_handle */ |
|
652 gss_name_t *, /* name */ |
|
653 OM_uint32 *, /* lifetime */ |
|
654 gss_cred_usage_t *, /* cred_usage */ |
|
655 gss_OID_set * /* mechanisms */ |
|
656 ); |
|
657 |
|
658 GSS_MAKE_TYPEDEF |
|
659 OM_uint32 |
|
660 GSS_CALLCONV GSS_FUNC(gss_inquire_context) |
|
661 (OM_uint32 *, /* minor_status */ |
|
662 const gss_ctx_id_t, /* context_handle */ |
|
663 gss_name_t *, /* src_name */ |
|
664 gss_name_t *, /* targ_name */ |
|
665 OM_uint32 *, /* lifetime_rec */ |
|
666 gss_OID *, /* mech_type */ |
|
667 OM_uint32 *, /* ctx_flags */ |
|
668 int *, /* locally_initiated */ |
|
669 int * /* open */ |
|
670 ); |
|
671 |
|
672 GSS_MAKE_TYPEDEF |
|
673 OM_uint32 |
|
674 GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit) |
|
675 (OM_uint32 *, /* minor_status */ |
|
676 const gss_ctx_id_t, /* context_handle */ |
|
677 int, /* conf_req_flag */ |
|
678 gss_qop_t, /* qop_req */ |
|
679 OM_uint32, /* req_output_size */ |
|
680 OM_uint32 * /* max_input_size */ |
|
681 ); |
|
682 |
|
683 GSS_MAKE_TYPEDEF |
|
684 OM_uint32 |
|
685 GSS_CALLCONV GSS_FUNC(gss_add_cred) |
|
686 (OM_uint32 *, /* minor_status */ |
|
687 const gss_cred_id_t, /* input_cred_handle */ |
|
688 const gss_name_t, /* desired_name */ |
|
689 const gss_OID, /* desired_mech */ |
|
690 gss_cred_usage_t, /* cred_usage */ |
|
691 OM_uint32, /* initiator_time_req */ |
|
692 OM_uint32, /* acceptor_time_req */ |
|
693 gss_cred_id_t *, /* output_cred_handle */ |
|
694 gss_OID_set *, /* actual_mechs */ |
|
695 OM_uint32 *, /* initiator_time_rec */ |
|
696 OM_uint32 * /* acceptor_time_rec */ |
|
697 ); |
|
698 |
|
699 GSS_MAKE_TYPEDEF |
|
700 OM_uint32 |
|
701 GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech) |
|
702 (OM_uint32 *, /* minor_status */ |
|
703 const gss_cred_id_t, /* cred_handle */ |
|
704 const gss_OID, /* mech_type */ |
|
705 gss_name_t *, /* name */ |
|
706 OM_uint32 *, /* initiator_lifetime */ |
|
707 OM_uint32 *, /* acceptor_lifetime */ |
|
708 gss_cred_usage_t * /* cred_usage */ |
|
709 ); |
|
710 |
|
711 GSS_MAKE_TYPEDEF |
|
712 OM_uint32 |
|
713 GSS_CALLCONV GSS_FUNC(gss_export_sec_context) |
|
714 (OM_uint32 *, /* minor_status */ |
|
715 gss_ctx_id_t *, /* context_handle */ |
|
716 gss_buffer_t /* interprocess_token */ |
|
717 ); |
|
718 |
|
719 GSS_MAKE_TYPEDEF |
|
720 OM_uint32 |
|
721 GSS_CALLCONV GSS_FUNC(gss_import_sec_context) |
|
722 (OM_uint32 *, /* minor_status */ |
|
723 const gss_buffer_t, /* interprocess_token */ |
|
724 gss_ctx_id_t * /* context_handle */ |
|
725 ); |
|
726 |
|
727 GSS_MAKE_TYPEDEF |
|
728 OM_uint32 |
|
729 GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set) |
|
730 (OM_uint32 *, /* minor_status */ |
|
731 gss_OID_set * /* oid_set */ |
|
732 ); |
|
733 |
|
734 GSS_MAKE_TYPEDEF |
|
735 OM_uint32 |
|
736 GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member) |
|
737 (OM_uint32 *, /* minor_status */ |
|
738 const gss_OID, /* member_oid */ |
|
739 gss_OID_set * /* oid_set */ |
|
740 ); |
|
741 |
|
742 GSS_MAKE_TYPEDEF |
|
743 OM_uint32 |
|
744 GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member) |
|
745 (OM_uint32 *, /* minor_status */ |
|
746 const gss_OID, /* member */ |
|
747 const gss_OID_set, /* set */ |
|
748 int * /* present */ |
|
749 ); |
|
750 |
|
751 GSS_MAKE_TYPEDEF |
|
752 OM_uint32 |
|
753 GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech) |
|
754 (OM_uint32 *, /* minor_status */ |
|
755 const gss_OID, /* mechanism */ |
|
756 gss_OID_set * /* name_types */ |
|
757 ); |
|
758 |
|
759 GSS_MAKE_TYPEDEF |
|
760 OM_uint32 |
|
761 GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name) |
|
762 (OM_uint32 *, /* minor_status */ |
|
763 const gss_name_t, /* input_name */ |
|
764 gss_OID_set * /* mech_types */ |
|
765 ); |
|
766 |
|
767 GSS_MAKE_TYPEDEF |
|
768 OM_uint32 |
|
769 GSS_CALLCONV GSS_FUNC(gss_canonicalize_name) |
|
770 (OM_uint32 *, /* minor_status */ |
|
771 const gss_name_t, /* input_name */ |
|
772 const gss_OID, /* mech_type */ |
|
773 gss_name_t * /* output_name */ |
|
774 ); |
|
775 |
|
776 GSS_MAKE_TYPEDEF |
|
777 OM_uint32 |
|
778 GSS_CALLCONV GSS_FUNC(gss_duplicate_name) |
|
779 (OM_uint32 *, /* minor_status */ |
|
780 const gss_name_t, /* src_name */ |
|
781 gss_name_t * /* dest_name */ |
|
782 ); |
|
783 |
|
784 /* |
|
785 * The following routines are obsolete variants of gss_get_mic, |
|
786 * gss_verify_mic, gss_wrap and gss_unwrap. They should be |
|
787 * provided by GSSAPI V2 implementations for backwards |
|
788 * compatibility with V1 applications. Distinct entrypoints |
|
789 * (as opposed to #defines) should be provided, both to allow |
|
790 * GSSAPI V1 applications to link against GSSAPI V2 implementations, |
|
791 * and to retain the slight parameter type differences between the |
|
792 * obsolete versions of these routines and their current forms. |
|
793 */ |
|
794 |
|
795 GSS_MAKE_TYPEDEF |
|
796 OM_uint32 |
|
797 GSS_CALLCONV GSS_FUNC(gss_sign) |
|
798 (OM_uint32 *, /* minor_status */ |
|
799 gss_ctx_id_t, /* context_handle */ |
|
800 int, /* qop_req */ |
|
801 gss_buffer_t, /* message_buffer */ |
|
802 gss_buffer_t /* message_token */ |
|
803 ); |
|
804 |
|
805 |
|
806 GSS_MAKE_TYPEDEF |
|
807 OM_uint32 |
|
808 GSS_CALLCONV GSS_FUNC(gss_verify) |
|
809 (OM_uint32 *, /* minor_status */ |
|
810 gss_ctx_id_t, /* context_handle */ |
|
811 gss_buffer_t, /* message_buffer */ |
|
812 gss_buffer_t, /* token_buffer */ |
|
813 int * /* qop_state */ |
|
814 ); |
|
815 |
|
816 GSS_MAKE_TYPEDEF |
|
817 OM_uint32 |
|
818 GSS_CALLCONV GSS_FUNC(gss_seal) |
|
819 (OM_uint32 *, /* minor_status */ |
|
820 gss_ctx_id_t, /* context_handle */ |
|
821 int, /* conf_req_flag */ |
|
822 int, /* qop_req */ |
|
823 gss_buffer_t, /* input_message_buffer */ |
|
824 int *, /* conf_state */ |
|
825 gss_buffer_t /* output_message_buffer */ |
|
826 ); |
|
827 |
|
828 |
|
829 GSS_MAKE_TYPEDEF |
|
830 OM_uint32 |
|
831 GSS_CALLCONV GSS_FUNC(gss_unseal) |
|
832 (OM_uint32 *, /* minor_status */ |
|
833 gss_ctx_id_t, /* context_handle */ |
|
834 gss_buffer_t, /* input_message_buffer */ |
|
835 gss_buffer_t, /* output_message_buffer */ |
|
836 int *, /* conf_state */ |
|
837 int * /* qop_state */ |
|
838 ); |
|
839 |
|
840 |
|
841 #if defined(XP_MACOSX) |
|
842 # pragma pack(pop) |
|
843 #endif |
|
844 |
|
845 EXTERN_C_END |
|
846 |
|
847 #endif /* GSSAPI_H_ */ |
|
848 |