Bug 496271, automation config for Tb2.0.0.22 build1, p=joduinn, r=me
[mozilla-1.9.git] / extensions / auth / gssapi.h
blob8954991d6d502458549c360ac68b5ec604287a26
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.
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 ***** */
24 #ifndef GSSAPI_H_
25 #define GSSAPI_H_
28 * Also define _GSSAPI_H_ as that is what the Kerberos 5 code defines and
29 * what header files on some systems look for.
31 #define _GSSAPI_H_
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.
38 #define _GSSAPI_GENERIC_H_
39 #define _GSSAPI_KRB5_H_
41 /*
42 * Define windows specific needed parameters.
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 */
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
70 * First, include stddef.h to get size_t defined.
72 #include <stddef.h>
75 * Configure set the following
78 #ifndef SIZEOF_LONG
79 #undef SIZEOF_LONG
80 #endif
81 #ifndef SIZEOF_SHORT
82 #undef SIZEOF_SHORT
83 #endif
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
95 EXTERN_C_BEGIN
98 * If the platform supports the xom.h header file, it should be
99 * included here.
101 /* #include <xom.h> */
105 * Now define the three implementation-dependent types.
108 typedef void * gss_name_t ;
109 typedef void * gss_ctx_id_t ;
110 typedef void * gss_cred_id_t ;
114 * The following type must be defined as the smallest natural
115 * unsigned integer supported by the platform that has at least
116 * 32 bits of precision.
119 #if SIZEOF_LONG == 4
120 typedef unsigned long gss_uint32;
121 #elif SIZEOF_SHORT == 4
122 typedef unsigned short gss_uint32;
123 #else
124 typedef unsigned int gss_uint32;
125 #endif
127 #ifdef OM_STRING
130 * We have included the xom.h header file. Verify that OM_uint32
131 * is defined correctly.
134 #if sizeof(gss_uint32) != sizeof(OM_uint32)
135 #error Incompatible definition of OM_uint32 from xom.h
136 #endif
138 typedef OM_object_identifier gss_OID_desc, *gss_OID;
140 #else /* !OM_STRING */
143 * We can't use X/Open definitions, so roll our own.
145 typedef gss_uint32 OM_uint32;
146 typedef struct gss_OID_desc_struct {
147 OM_uint32 length;
148 void *elements;
149 } gss_OID_desc, *gss_OID;
151 #endif /* !OM_STRING */
153 typedef struct gss_OID_set_desc_struct {
154 size_t count;
155 gss_OID elements;
156 } gss_OID_set_desc, *gss_OID_set;
160 * For now, define a QOP-type as an OM_uint32
162 typedef OM_uint32 gss_qop_t;
164 typedef int gss_cred_usage_t;
167 typedef struct gss_buffer_desc_struct {
168 size_t length;
169 void *value;
170 } gss_buffer_desc, *gss_buffer_t;
172 typedef struct gss_channel_bindings_struct {
173 OM_uint32 initiator_addrtype;
174 gss_buffer_desc initiator_address;
175 OM_uint32 acceptor_addrtype;
176 gss_buffer_desc acceptor_address;
177 gss_buffer_desc application_data;
178 } *gss_channel_bindings_t;
182 * Flag bits for context-level services.
184 #define GSS_C_DELEG_FLAG 1
185 #define GSS_C_MUTUAL_FLAG 2
186 #define GSS_C_REPLAY_FLAG 4
187 #define GSS_C_SEQUENCE_FLAG 8
188 #define GSS_C_CONF_FLAG 16
189 #define GSS_C_INTEG_FLAG 32
190 #define GSS_C_ANON_FLAG 64
191 #define GSS_C_PROT_READY_FLAG 128
192 #define GSS_C_TRANS_FLAG 256
195 * Credential usage options
197 #define GSS_C_BOTH 0
198 #define GSS_C_INITIATE 1
199 #define GSS_C_ACCEPT 2
202 * Status code types for gss_display_status
204 #define GSS_C_GSS_CODE 1
205 #define GSS_C_MECH_CODE 2
208 * The constant definitions for channel-bindings address families
210 #define GSS_C_AF_UNSPEC 0
211 #define GSS_C_AF_LOCAL 1
212 #define GSS_C_AF_INET 2
213 #define GSS_C_AF_IMPLINK 3
214 #define GSS_C_AF_PUP 4
215 #define GSS_C_AF_CHAOS 5
216 #define GSS_C_AF_NS 6
217 #define GSS_C_AF_NBS 7
218 #define GSS_C_AF_ECMA 8
219 #define GSS_C_AF_DATAKIT 9
220 #define GSS_C_AF_CCITT 10
221 #define GSS_C_AF_SNA 11
222 #define GSS_C_AF_DECnet 12
223 #define GSS_C_AF_DLI 13
224 #define GSS_C_AF_LAT 14
225 #define GSS_C_AF_HYLINK 15
226 #define GSS_C_AF_APPLETALK 16
227 #define GSS_C_AF_BSC 17
228 #define GSS_C_AF_DSS 18
229 #define GSS_C_AF_OSI 19
230 #define GSS_C_AF_X25 21
232 #define GSS_C_AF_NULLADDR 255
235 * Various Null values
237 #define GSS_C_NO_NAME ((gss_name_t) 0)
238 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
239 #define GSS_C_NO_OID ((gss_OID) 0)
240 #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
241 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
242 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
243 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
244 #define GSS_C_EMPTY_BUFFER {0, NULL}
247 * Some alternate names for a couple of the above
248 * values. These are defined for V1 compatibility.
250 #define GSS_C_NULL_OID GSS_C_NO_OID
251 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
254 * Define the default Quality of Protection for per-message
255 * services. Note that an implementation that offers multiple
256 * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
257 * (as done here) to mean "default protection", or to a specific
258 * explicit QOP value. However, a value of 0 should always be
259 * interpreted by a GSSAPI implementation as a request for the
260 * default protection level.
262 #define GSS_C_QOP_DEFAULT 0
265 * Expiration time of 2^32-1 seconds means infinite lifetime for a
266 * credential or security context
268 #define GSS_C_INDEFINITE 0xfffffffful
271 * The implementation must reserve static storage for a
272 * gss_OID_desc object containing the value
273 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
274 * "\x01\x02\x01\x01"},
275 * corresponding to an object-identifier value of
276 * {iso(1) member-body(2) United States(840) mit(113554)
277 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
278 * GSS_C_NT_USER_NAME should be initialized to point
279 * to that gss_OID_desc.
281 extern gss_OID GSS_C_NT_USER_NAME;
284 * The implementation must reserve static storage for a
285 * gss_OID_desc object containing the value
286 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
287 * "\x01\x02\x01\x02"},
288 * corresponding to an object-identifier value of
289 * {iso(1) member-body(2) United States(840) mit(113554)
290 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
291 * The constant GSS_C_NT_MACHINE_UID_NAME should be
292 * initialized to point to that gss_OID_desc.
294 extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
297 * The implementation must reserve static storage for a
298 * gss_OID_desc object containing the value
299 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
300 * "\x01\x02\x01\x03"},
301 * corresponding to an object-identifier value of
302 * {iso(1) member-body(2) United States(840) mit(113554)
303 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
304 * The constant GSS_C_NT_STRING_UID_NAME should be
305 * initialized to point to that gss_OID_desc.
307 extern gss_OID GSS_C_NT_STRING_UID_NAME;
310 * The implementation must reserve static storage for a
311 * gss_OID_desc object containing the value
312 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
313 * corresponding to an object-identifier value of
314 * {iso(1) org(3) dod(6) internet(1) security(5)
315 * nametypes(6) gss-host-based-services(2)). The constant
316 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
317 * to that gss_OID_desc. This is a deprecated OID value, and
318 * implementations wishing to support hostbased-service names
319 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
320 * defined below, to identify such names;
321 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
322 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
323 * parameter, but should not be emitted by GSSAPI
324 * implementations
326 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
329 * The implementation must reserve static storage for a
330 * gss_OID_desc object containing the value
331 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
332 * "\x01\x02\x01\x04"}, corresponding to an
333 * object-identifier value of {iso(1) member-body(2)
334 * Unites States(840) mit(113554) infosys(1) gssapi(2)
335 * generic(1) service_name(4)}. The constant
336 * GSS_C_NT_HOSTBASED_SERVICE should be initialized
337 * to point to that gss_OID_desc.
339 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
343 * The implementation must reserve static storage for a
344 * gss_OID_desc object containing the value
345 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
346 * corresponding to an object identifier value of
347 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
348 * 6(nametypes), 3(gss-anonymous-name)}. The constant
349 * and GSS_C_NT_ANONYMOUS should be initialized to point
350 * to that gss_OID_desc.
352 extern gss_OID GSS_C_NT_ANONYMOUS;
355 * The implementation must reserve static storage for a
356 * gss_OID_desc object containing the value
357 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
358 * corresponding to an object-identifier value of
359 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
360 * 6(nametypes), 4(gss-api-exported-name)}. The constant
361 * GSS_C_NT_EXPORT_NAME should be initialized to point
362 * to that gss_OID_desc.
364 extern gss_OID GSS_C_NT_EXPORT_NAME;
366 /* Major status codes */
368 #define GSS_S_COMPLETE 0
371 * Some "helper" definitions to make the status code macros obvious.
373 #define GSS_C_CALLING_ERROR_OFFSET 24
374 #define GSS_C_ROUTINE_ERROR_OFFSET 16
375 #define GSS_C_SUPPLEMENTARY_OFFSET 0
376 #define GSS_C_CALLING_ERROR_MASK 0377ul
377 #define GSS_C_ROUTINE_ERROR_MASK 0377ul
378 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul
381 * The macros that test status codes for error conditions.
382 * Note that the GSS_ERROR() macro has changed slightly from
383 * the V1 GSSAPI so that it now evaluates its argument
384 * only once.
386 #define GSS_CALLING_ERROR(x) \
387 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
388 #define GSS_ROUTINE_ERROR(x) \
389 (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
390 #define GSS_SUPPLEMENTARY_INFO(x) \
391 (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
392 #define GSS_ERROR(x) \
393 (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
394 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
397 * Now the actual status code definitions
401 * Calling errors:
403 #define GSS_S_CALL_INACCESSIBLE_READ \
404 (1ul << GSS_C_CALLING_ERROR_OFFSET)
405 #define GSS_S_CALL_INACCESSIBLE_WRITE \
406 (2ul << GSS_C_CALLING_ERROR_OFFSET)
407 #define GSS_S_CALL_BAD_STRUCTURE \
408 (3ul << GSS_C_CALLING_ERROR_OFFSET)
411 * Routine errors:
413 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
414 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
415 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
416 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
417 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
418 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
419 #define GSS_S_BAD_MIC GSS_S_BAD_SIG
420 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
421 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
422 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
423 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
424 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
425 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
426 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
427 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
428 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
429 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
430 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
431 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
434 * Supplementary info bits:
436 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
437 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
438 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
439 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
440 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
443 * Finally, function prototypes for the GSS-API routines.
446 GSS_MAKE_TYPEDEF
447 OM_uint32
448 GSS_CALLCONV GSS_FUNC(gss_acquire_cred)
449 (OM_uint32 *, /* minor_status */
450 const gss_name_t, /* desired_name */
451 OM_uint32, /* time_req */
452 const gss_OID_set, /* desired_mechs */
453 gss_cred_usage_t, /* cred_usage */
454 gss_cred_id_t *, /* output_cred_handle */
455 gss_OID_set *, /* actual_mechs */
456 OM_uint32 * /* time_rec */
459 GSS_MAKE_TYPEDEF
460 OM_uint32
461 GSS_CALLCONV GSS_FUNC(gss_release_cred)
462 (OM_uint32 *, /* minor_status */
463 gss_cred_id_t * /* cred_handle */
466 GSS_MAKE_TYPEDEF
467 OM_uint32
468 GSS_CALLCONV GSS_FUNC(gss_init_sec_context)
469 (OM_uint32 *, /* minor_status */
470 const gss_cred_id_t, /* initiator_cred_handle */
471 gss_ctx_id_t *, /* context_handle */
472 const gss_name_t, /* target_name */
473 const gss_OID, /* mech_type */
474 OM_uint32, /* req_flags */
475 OM_uint32, /* time_req */
476 const gss_channel_bindings_t, /* input_chan_bindings */
477 const gss_buffer_t, /* input_token */
478 gss_OID *, /* actual_mech_type */
479 gss_buffer_t, /* output_token */
480 OM_uint32 *, /* ret_flags */
481 OM_uint32 * /* time_rec */
484 GSS_MAKE_TYPEDEF
485 OM_uint32
486 GSS_CALLCONV GSS_FUNC(gss_accept_sec_context)
487 (OM_uint32 *, /* minor_status */
488 gss_ctx_id_t *, /* context_handle */
489 const gss_cred_id_t, /* acceptor_cred_handle */
490 const gss_buffer_t, /* input_token_buffer */
491 const gss_channel_bindings_t, /* input_chan_bindings */
492 gss_name_t *, /* src_name */
493 gss_OID *, /* mech_type */
494 gss_buffer_t, /* output_token */
495 OM_uint32 *, /* ret_flags */
496 OM_uint32 *, /* time_rec */
497 gss_cred_id_t * /* delegated_cred_handle */
500 GSS_MAKE_TYPEDEF
501 OM_uint32
502 GSS_CALLCONV GSS_FUNC(gss_process_context_token)
503 (OM_uint32 *, /* minor_status */
504 const gss_ctx_id_t, /* context_handle */
505 const gss_buffer_t /* token_buffer */
508 GSS_MAKE_TYPEDEF
509 OM_uint32
510 GSS_CALLCONV GSS_FUNC(gss_delete_sec_context)
511 (OM_uint32 *, /* minor_status */
512 gss_ctx_id_t *, /* context_handle */
513 gss_buffer_t /* output_token */
516 GSS_MAKE_TYPEDEF
517 OM_uint32
518 GSS_CALLCONV GSS_FUNC(gss_context_time)
519 (OM_uint32 *, /* minor_status */
520 const gss_ctx_id_t, /* context_handle */
521 OM_uint32 * /* time_rec */
524 GSS_MAKE_TYPEDEF
525 OM_uint32
526 GSS_CALLCONV GSS_FUNC(gss_get_mic)
527 (OM_uint32 *, /* minor_status */
528 const gss_ctx_id_t, /* context_handle */
529 gss_qop_t, /* qop_req */
530 const gss_buffer_t, /* message_buffer */
531 gss_buffer_t /* message_token */
535 GSS_MAKE_TYPEDEF
536 OM_uint32
537 GSS_CALLCONV GSS_FUNC(gss_verify_mic)
538 (OM_uint32 *, /* minor_status */
539 const gss_ctx_id_t, /* context_handle */
540 const gss_buffer_t, /* message_buffer */
541 const gss_buffer_t, /* token_buffer */
542 gss_qop_t * /* qop_state */
545 GSS_MAKE_TYPEDEF
546 OM_uint32
547 GSS_CALLCONV GSS_FUNC(gss_wrap)
548 (OM_uint32 *, /* minor_status */
549 const gss_ctx_id_t, /* context_handle */
550 int, /* conf_req_flag */
551 gss_qop_t, /* qop_req */
552 const gss_buffer_t, /* input_message_buffer */
553 int *, /* conf_state */
554 gss_buffer_t /* output_message_buffer */
558 GSS_MAKE_TYPEDEF
559 OM_uint32
560 GSS_CALLCONV GSS_FUNC(gss_unwrap)
561 (OM_uint32 *, /* minor_status */
562 const gss_ctx_id_t, /* context_handle */
563 const gss_buffer_t, /* input_message_buffer */
564 gss_buffer_t, /* output_message_buffer */
565 int *, /* conf_state */
566 gss_qop_t * /* qop_state */
569 GSS_MAKE_TYPEDEF
570 OM_uint32
571 GSS_CALLCONV GSS_FUNC(gss_display_status)
572 (OM_uint32 *, /* minor_status */
573 OM_uint32, /* status_value */
574 int, /* status_type */
575 const gss_OID, /* mech_type */
576 OM_uint32 *, /* message_context */
577 gss_buffer_t /* status_string */
580 GSS_MAKE_TYPEDEF
581 OM_uint32
582 GSS_CALLCONV GSS_FUNC(gss_indicate_mechs)
583 (OM_uint32 *, /* minor_status */
584 gss_OID_set * /* mech_set */
587 GSS_MAKE_TYPEDEF
588 OM_uint32
589 GSS_CALLCONV GSS_FUNC(gss_compare_name)
590 (OM_uint32 *, /* minor_status */
591 const gss_name_t, /* name1 */
592 const gss_name_t, /* name2 */
593 int * /* name_equal */
596 GSS_MAKE_TYPEDEF
597 OM_uint32
598 GSS_CALLCONV GSS_FUNC(gss_display_name)
599 (OM_uint32 *, /* minor_status */
600 const gss_name_t, /* input_name */
601 gss_buffer_t, /* output_name_buffer */
602 gss_OID * /* output_name_type */
605 GSS_MAKE_TYPEDEF
606 OM_uint32
607 GSS_CALLCONV GSS_FUNC(gss_import_name)
608 (OM_uint32 *, /* minor_status */
609 const gss_buffer_t, /* input_name_buffer */
610 const gss_OID, /* input_name_type */
611 gss_name_t * /* output_name */
614 GSS_MAKE_TYPEDEF
615 OM_uint32
616 GSS_CALLCONV GSS_FUNC(gss_export_name)
617 (OM_uint32 *, /* minor_status */
618 const gss_name_t, /* input_name */
619 gss_buffer_t /* exported_name */
622 GSS_MAKE_TYPEDEF
623 OM_uint32
624 GSS_CALLCONV GSS_FUNC(gss_release_name)
625 (OM_uint32 *, /* minor_status */
626 gss_name_t * /* input_name */
629 GSS_MAKE_TYPEDEF
630 OM_uint32
631 GSS_CALLCONV GSS_FUNC(gss_release_buffer)
632 (OM_uint32 *, /* minor_status */
633 gss_buffer_t /* buffer */
636 GSS_MAKE_TYPEDEF
637 OM_uint32
638 GSS_CALLCONV GSS_FUNC(gss_release_oid_set)
639 (OM_uint32 *, /* minor_status */
640 gss_OID_set * /* set */
643 GSS_MAKE_TYPEDEF
644 OM_uint32
645 GSS_CALLCONV GSS_FUNC(gss_inquire_cred)
646 (OM_uint32 *, /* minor_status */
647 const gss_cred_id_t, /* cred_handle */
648 gss_name_t *, /* name */
649 OM_uint32 *, /* lifetime */
650 gss_cred_usage_t *, /* cred_usage */
651 gss_OID_set * /* mechanisms */
654 GSS_MAKE_TYPEDEF
655 OM_uint32
656 GSS_CALLCONV GSS_FUNC(gss_inquire_context)
657 (OM_uint32 *, /* minor_status */
658 const gss_ctx_id_t, /* context_handle */
659 gss_name_t *, /* src_name */
660 gss_name_t *, /* targ_name */
661 OM_uint32 *, /* lifetime_rec */
662 gss_OID *, /* mech_type */
663 OM_uint32 *, /* ctx_flags */
664 int *, /* locally_initiated */
665 int * /* open */
668 GSS_MAKE_TYPEDEF
669 OM_uint32
670 GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit)
671 (OM_uint32 *, /* minor_status */
672 const gss_ctx_id_t, /* context_handle */
673 int, /* conf_req_flag */
674 gss_qop_t, /* qop_req */
675 OM_uint32, /* req_output_size */
676 OM_uint32 * /* max_input_size */
679 GSS_MAKE_TYPEDEF
680 OM_uint32
681 GSS_CALLCONV GSS_FUNC(gss_add_cred)
682 (OM_uint32 *, /* minor_status */
683 const gss_cred_id_t, /* input_cred_handle */
684 const gss_name_t, /* desired_name */
685 const gss_OID, /* desired_mech */
686 gss_cred_usage_t, /* cred_usage */
687 OM_uint32, /* initiator_time_req */
688 OM_uint32, /* acceptor_time_req */
689 gss_cred_id_t *, /* output_cred_handle */
690 gss_OID_set *, /* actual_mechs */
691 OM_uint32 *, /* initiator_time_rec */
692 OM_uint32 * /* acceptor_time_rec */
695 GSS_MAKE_TYPEDEF
696 OM_uint32
697 GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech)
698 (OM_uint32 *, /* minor_status */
699 const gss_cred_id_t, /* cred_handle */
700 const gss_OID, /* mech_type */
701 gss_name_t *, /* name */
702 OM_uint32 *, /* initiator_lifetime */
703 OM_uint32 *, /* acceptor_lifetime */
704 gss_cred_usage_t * /* cred_usage */
707 GSS_MAKE_TYPEDEF
708 OM_uint32
709 GSS_CALLCONV GSS_FUNC(gss_export_sec_context)
710 (OM_uint32 *, /* minor_status */
711 gss_ctx_id_t *, /* context_handle */
712 gss_buffer_t /* interprocess_token */
715 GSS_MAKE_TYPEDEF
716 OM_uint32
717 GSS_CALLCONV GSS_FUNC(gss_import_sec_context)
718 (OM_uint32 *, /* minor_status */
719 const gss_buffer_t, /* interprocess_token */
720 gss_ctx_id_t * /* context_handle */
723 GSS_MAKE_TYPEDEF
724 OM_uint32
725 GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set)
726 (OM_uint32 *, /* minor_status */
727 gss_OID_set * /* oid_set */
730 GSS_MAKE_TYPEDEF
731 OM_uint32
732 GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member)
733 (OM_uint32 *, /* minor_status */
734 const gss_OID, /* member_oid */
735 gss_OID_set * /* oid_set */
738 GSS_MAKE_TYPEDEF
739 OM_uint32
740 GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member)
741 (OM_uint32 *, /* minor_status */
742 const gss_OID, /* member */
743 const gss_OID_set, /* set */
744 int * /* present */
747 GSS_MAKE_TYPEDEF
748 OM_uint32
749 GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech)
750 (OM_uint32 *, /* minor_status */
751 const gss_OID, /* mechanism */
752 gss_OID_set * /* name_types */
755 GSS_MAKE_TYPEDEF
756 OM_uint32
757 GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name)
758 (OM_uint32 *, /* minor_status */
759 const gss_name_t, /* input_name */
760 gss_OID_set * /* mech_types */
763 GSS_MAKE_TYPEDEF
764 OM_uint32
765 GSS_CALLCONV GSS_FUNC(gss_canonicalize_name)
766 (OM_uint32 *, /* minor_status */
767 const gss_name_t, /* input_name */
768 const gss_OID, /* mech_type */
769 gss_name_t * /* output_name */
772 GSS_MAKE_TYPEDEF
773 OM_uint32
774 GSS_CALLCONV GSS_FUNC(gss_duplicate_name)
775 (OM_uint32 *, /* minor_status */
776 const gss_name_t, /* src_name */
777 gss_name_t * /* dest_name */
781 * The following routines are obsolete variants of gss_get_mic,
782 * gss_verify_mic, gss_wrap and gss_unwrap. They should be
783 * provided by GSSAPI V2 implementations for backwards
784 * compatibility with V1 applications. Distinct entrypoints
785 * (as opposed to #defines) should be provided, both to allow
786 * GSSAPI V1 applications to link against GSSAPI V2 implementations,
787 * and to retain the slight parameter type differences between the
788 * obsolete versions of these routines and their current forms.
791 GSS_MAKE_TYPEDEF
792 OM_uint32
793 GSS_CALLCONV GSS_FUNC(gss_sign)
794 (OM_uint32 *, /* minor_status */
795 gss_ctx_id_t, /* context_handle */
796 int, /* qop_req */
797 gss_buffer_t, /* message_buffer */
798 gss_buffer_t /* message_token */
802 GSS_MAKE_TYPEDEF
803 OM_uint32
804 GSS_CALLCONV GSS_FUNC(gss_verify)
805 (OM_uint32 *, /* minor_status */
806 gss_ctx_id_t, /* context_handle */
807 gss_buffer_t, /* message_buffer */
808 gss_buffer_t, /* token_buffer */
809 int * /* qop_state */
812 GSS_MAKE_TYPEDEF
813 OM_uint32
814 GSS_CALLCONV GSS_FUNC(gss_seal)
815 (OM_uint32 *, /* minor_status */
816 gss_ctx_id_t, /* context_handle */
817 int, /* conf_req_flag */
818 int, /* qop_req */
819 gss_buffer_t, /* input_message_buffer */
820 int *, /* conf_state */
821 gss_buffer_t /* output_message_buffer */
825 GSS_MAKE_TYPEDEF
826 OM_uint32
827 GSS_CALLCONV GSS_FUNC(gss_unseal)
828 (OM_uint32 *, /* minor_status */
829 gss_ctx_id_t, /* context_handle */
830 gss_buffer_t, /* input_message_buffer */
831 gss_buffer_t, /* output_message_buffer */
832 int *, /* conf_state */
833 int * /* qop_state */
838 EXTERN_C_END
840 #endif /* GSSAPI_H_ */