Bug 1858509 add thread-safety annotations around MediaSourceDemuxer::mMonitor r=alwu
[gecko.git] / extensions / auth / gssapi.h
blob826d69df79d504716d2b7ba5d43ccb6186b06df4
1 /* vim:set ts=4 sw=2 sts=2 et cindent: */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Copyright 1993 by OpenVision Technologies, Inc.
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_
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
97 #if defined(XP_MACOSX) && !defined(__aarch64__)
98 # pragma pack(push, 2)
99 #endif
102 * If the platform supports the xom.h header file, it should be
103 * included here.
105 /* #include <xom.h> */
108 * Now define the three implementation-dependent types.
111 typedef void* gss_name_t;
112 typedef void* gss_ctx_id_t;
113 typedef void* gss_cred_id_t;
116 * The following type must be defined as the smallest natural
117 * unsigned integer supported by the platform that has at least
118 * 32 bits of precision.
121 #if SIZEOF_LONG == 4
122 typedef unsigned long gss_uint32;
123 #elif SIZEOF_SHORT == 4
124 typedef unsigned short gss_uint32;
125 #else
126 typedef unsigned int gss_uint32;
127 #endif
129 #ifdef OM_STRING
132 * We have included the xom.h header file. Verify that OM_uint32
133 * is defined correctly.
136 # if sizeof(gss_uint32) != sizeof(OM_uint32)
137 # error Incompatible definition of OM_uint32 from xom.h
138 # endif
140 typedef OM_object_identifier gss_OID_desc, *gss_OID;
142 #else /* !OM_STRING */
145 * We can't use X/Open definitions, so roll our own.
147 typedef gss_uint32 OM_uint32;
148 typedef struct gss_OID_desc_struct {
149 OM_uint32 length;
150 void* elements;
151 } gss_OID_desc, *gss_OID;
153 #endif /* !OM_STRING */
155 typedef struct gss_OID_set_desc_struct {
156 size_t count;
157 gss_OID elements;
158 } gss_OID_set_desc, *gss_OID_set;
161 * For now, define a QOP-type as an OM_uint32
163 typedef OM_uint32 gss_qop_t;
165 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;
181 * Flag bits for context-level services.
183 #define GSS_C_DELEG_FLAG 1
184 #define GSS_C_MUTUAL_FLAG 2
185 #define GSS_C_REPLAY_FLAG 4
186 #define GSS_C_SEQUENCE_FLAG 8
187 #define GSS_C_CONF_FLAG 16
188 #define GSS_C_INTEG_FLAG 32
189 #define GSS_C_ANON_FLAG 64
190 #define GSS_C_PROT_READY_FLAG 128
191 #define GSS_C_TRANS_FLAG 256
194 * Credential usage options
196 #define GSS_C_BOTH 0
197 #define GSS_C_INITIATE 1
198 #define GSS_C_ACCEPT 2
201 * Status code types for gss_display_status
203 #define GSS_C_GSS_CODE 1
204 #define GSS_C_MECH_CODE 2
207 * The constant definitions for channel-bindings address families
209 #define GSS_C_AF_UNSPEC 0
210 #define GSS_C_AF_LOCAL 1
211 #define GSS_C_AF_INET 2
212 #define GSS_C_AF_IMPLINK 3
213 #define GSS_C_AF_PUP 4
214 #define GSS_C_AF_CHAOS 5
215 #define GSS_C_AF_NS 6
216 #define GSS_C_AF_NBS 7
217 #define GSS_C_AF_ECMA 8
218 #define GSS_C_AF_DATAKIT 9
219 #define GSS_C_AF_CCITT 10
220 #define GSS_C_AF_SNA 11
221 #define GSS_C_AF_DECnet 12
222 #define GSS_C_AF_DLI 13
223 #define GSS_C_AF_LAT 14
224 #define GSS_C_AF_HYLINK 15
225 #define GSS_C_AF_APPLETALK 16
226 #define GSS_C_AF_BSC 17
227 #define GSS_C_AF_DSS 18
228 #define GSS_C_AF_OSI 19
229 #define GSS_C_AF_X25 21
231 #define GSS_C_AF_NULLADDR 255
234 * Various Null values
236 #define GSS_C_NO_NAME ((gss_name_t)0)
237 #define GSS_C_NO_BUFFER ((gss_buffer_t)0)
238 #define GSS_C_NO_OID ((gss_OID)0)
239 #define GSS_C_NO_OID_SET ((gss_OID_set)0)
240 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t)0)
241 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t)0)
242 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t)0)
243 #define GSS_C_EMPTY_BUFFER \
244 { 0, nullptr }
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;
342 * The implementation must reserve static storage for a
343 * gss_OID_desc object containing the value
344 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
345 * corresponding to an object identifier value of
346 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
347 * 6(nametypes), 3(gss-anonymous-name)}. The constant
348 * and GSS_C_NT_ANONYMOUS should be initialized to point
349 * to that gss_OID_desc.
351 extern gss_OID GSS_C_NT_ANONYMOUS;
354 * The implementation must reserve static storage for a
355 * gss_OID_desc object containing the value
356 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
357 * corresponding to an object-identifier value of
358 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
359 * 6(nametypes), 4(gss-api-exported-name)}. The constant
360 * GSS_C_NT_EXPORT_NAME should be initialized to point
361 * to that gss_OID_desc.
363 extern gss_OID GSS_C_NT_EXPORT_NAME;
365 /* Major status codes */
367 #define GSS_S_COMPLETE 0
370 * Some "helper" definitions to make the status code macros obvious.
372 #define GSS_C_CALLING_ERROR_OFFSET 24
373 #define GSS_C_ROUTINE_ERROR_OFFSET 16
374 #define GSS_C_SUPPLEMENTARY_OFFSET 0
375 #define GSS_C_CALLING_ERROR_MASK 0377ul
376 #define GSS_C_ROUTINE_ERROR_MASK 0377ul
377 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul
380 * The macros that test status codes for error conditions.
381 * Note that the GSS_ERROR() macro has changed slightly from
382 * the V1 GSSAPI so that it now evaluates its argument
383 * only once.
385 #define GSS_CALLING_ERROR(x) \
386 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
387 #define GSS_ROUTINE_ERROR(x) \
388 (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
389 #define GSS_SUPPLEMENTARY_INFO(x) \
390 (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
391 #define GSS_ERROR(x) \
392 (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
393 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
396 * Now the actual status code definitions
400 * Calling errors:
402 #define GSS_S_CALL_INACCESSIBLE_READ (1ul << GSS_C_CALLING_ERROR_OFFSET)
403 #define GSS_S_CALL_INACCESSIBLE_WRITE (2ul << GSS_C_CALLING_ERROR_OFFSET)
404 #define GSS_S_CALL_BAD_STRUCTURE (3ul << GSS_C_CALLING_ERROR_OFFSET)
407 * Routine errors:
409 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
410 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
411 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
412 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
413 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
414 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
415 #define GSS_S_BAD_MIC GSS_S_BAD_SIG
416 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
417 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
418 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
419 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
420 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
421 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
422 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
423 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
424 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
425 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
426 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
427 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
430 * Supplementary info bits:
432 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
433 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
434 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
435 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
436 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
439 * Finally, function prototypes for the GSS-API routines.
442 GSS_MAKE_TYPEDEF
443 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_acquire_cred)(
444 OM_uint32*, /* minor_status */
445 const gss_name_t, /* desired_name */
446 OM_uint32, /* time_req */
447 const gss_OID_set, /* desired_mechs */
448 gss_cred_usage_t, /* cred_usage */
449 gss_cred_id_t*, /* output_cred_handle */
450 gss_OID_set*, /* actual_mechs */
451 OM_uint32* /* time_rec */
454 GSS_MAKE_TYPEDEF
455 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_release_cred)(
456 OM_uint32*, /* minor_status */
457 gss_cred_id_t* /* cred_handle */
460 GSS_MAKE_TYPEDEF
461 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_init_sec_context)(
462 OM_uint32*, /* minor_status */
463 const gss_cred_id_t, /* initiator_cred_handle */
464 gss_ctx_id_t*, /* context_handle */
465 const gss_name_t, /* target_name */
466 const gss_OID, /* mech_type */
467 OM_uint32, /* req_flags */
468 OM_uint32, /* time_req */
469 const gss_channel_bindings_t, /* input_chan_bindings */
470 const gss_buffer_t, /* input_token */
471 gss_OID*, /* actual_mech_type */
472 gss_buffer_t, /* output_token */
473 OM_uint32*, /* ret_flags */
474 OM_uint32* /* time_rec */
477 GSS_MAKE_TYPEDEF
478 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_accept_sec_context)(
479 OM_uint32*, /* minor_status */
480 gss_ctx_id_t*, /* context_handle */
481 const gss_cred_id_t, /* acceptor_cred_handle */
482 const gss_buffer_t, /* input_token_buffer */
483 const gss_channel_bindings_t, /* input_chan_bindings */
484 gss_name_t*, /* src_name */
485 gss_OID*, /* mech_type */
486 gss_buffer_t, /* output_token */
487 OM_uint32*, /* ret_flags */
488 OM_uint32*, /* time_rec */
489 gss_cred_id_t* /* delegated_cred_handle */
492 GSS_MAKE_TYPEDEF
493 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_process_context_token)(
494 OM_uint32*, /* minor_status */
495 const gss_ctx_id_t, /* context_handle */
496 const gss_buffer_t /* token_buffer */
499 GSS_MAKE_TYPEDEF
500 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_delete_sec_context)(
501 OM_uint32*, /* minor_status */
502 gss_ctx_id_t*, /* context_handle */
503 gss_buffer_t /* output_token */
506 GSS_MAKE_TYPEDEF
507 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_context_time)(
508 OM_uint32*, /* minor_status */
509 const gss_ctx_id_t, /* context_handle */
510 OM_uint32* /* time_rec */
513 GSS_MAKE_TYPEDEF
514 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_get_mic)(
515 OM_uint32*, /* minor_status */
516 const gss_ctx_id_t, /* context_handle */
517 gss_qop_t, /* qop_req */
518 const gss_buffer_t, /* message_buffer */
519 gss_buffer_t /* message_token */
522 GSS_MAKE_TYPEDEF
523 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_verify_mic)(
524 OM_uint32*, /* minor_status */
525 const gss_ctx_id_t, /* context_handle */
526 const gss_buffer_t, /* message_buffer */
527 const gss_buffer_t, /* token_buffer */
528 gss_qop_t* /* qop_state */
531 GSS_MAKE_TYPEDEF
532 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_wrap)(
533 OM_uint32*, /* minor_status */
534 const gss_ctx_id_t, /* context_handle */
535 int, /* conf_req_flag */
536 gss_qop_t, /* qop_req */
537 const gss_buffer_t, /* input_message_buffer */
538 int*, /* conf_state */
539 gss_buffer_t /* output_message_buffer */
542 GSS_MAKE_TYPEDEF
543 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_unwrap)(
544 OM_uint32*, /* minor_status */
545 const gss_ctx_id_t, /* context_handle */
546 const gss_buffer_t, /* input_message_buffer */
547 gss_buffer_t, /* output_message_buffer */
548 int*, /* conf_state */
549 gss_qop_t* /* qop_state */
552 GSS_MAKE_TYPEDEF
553 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_display_status)(
554 OM_uint32*, /* minor_status */
555 OM_uint32, /* status_value */
556 int, /* status_type */
557 const gss_OID, /* mech_type */
558 OM_uint32*, /* message_context */
559 gss_buffer_t /* status_string */
562 GSS_MAKE_TYPEDEF
563 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_indicate_mechs)(
564 OM_uint32*, /* minor_status */
565 gss_OID_set* /* mech_set */
568 GSS_MAKE_TYPEDEF
569 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_compare_name)(OM_uint32*, /* minor_status */
570 const gss_name_t, /* name1 */
571 const gss_name_t, /* name2 */
572 int* /* name_equal */
575 GSS_MAKE_TYPEDEF
576 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_display_name)(
577 OM_uint32*, /* minor_status */
578 const gss_name_t, /* input_name */
579 gss_buffer_t, /* output_name_buffer */
580 gss_OID* /* output_name_type */
583 GSS_MAKE_TYPEDEF
584 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_import_name)(
585 OM_uint32*, /* minor_status */
586 const gss_buffer_t, /* input_name_buffer */
587 const gss_OID, /* input_name_type */
588 gss_name_t* /* output_name */
591 GSS_MAKE_TYPEDEF
592 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_export_name)(
593 OM_uint32*, /* minor_status */
594 const gss_name_t, /* input_name */
595 gss_buffer_t /* exported_name */
598 GSS_MAKE_TYPEDEF
599 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_release_name)(OM_uint32*, /* minor_status */
600 gss_name_t* /* input_name */
603 GSS_MAKE_TYPEDEF
604 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_release_buffer)(
605 OM_uint32*, /* minor_status */
606 gss_buffer_t /* buffer */
609 GSS_MAKE_TYPEDEF
610 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_release_oid_set)(
611 OM_uint32*, /* minor_status */
612 gss_OID_set* /* set */
615 GSS_MAKE_TYPEDEF
616 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_inquire_cred)(
617 OM_uint32*, /* minor_status */
618 const gss_cred_id_t, /* cred_handle */
619 gss_name_t*, /* name */
620 OM_uint32*, /* lifetime */
621 gss_cred_usage_t*, /* cred_usage */
622 gss_OID_set* /* mechanisms */
625 GSS_MAKE_TYPEDEF
626 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_inquire_context)(
627 OM_uint32*, /* minor_status */
628 const gss_ctx_id_t, /* context_handle */
629 gss_name_t*, /* src_name */
630 gss_name_t*, /* targ_name */
631 OM_uint32*, /* lifetime_rec */
632 gss_OID*, /* mech_type */
633 OM_uint32*, /* ctx_flags */
634 int*, /* locally_initiated */
635 int* /* open */
638 GSS_MAKE_TYPEDEF
639 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit)(
640 OM_uint32*, /* minor_status */
641 const gss_ctx_id_t, /* context_handle */
642 int, /* conf_req_flag */
643 gss_qop_t, /* qop_req */
644 OM_uint32, /* req_output_size */
645 OM_uint32* /* max_input_size */
648 GSS_MAKE_TYPEDEF
649 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_add_cred)(
650 OM_uint32*, /* minor_status */
651 const gss_cred_id_t, /* input_cred_handle */
652 const gss_name_t, /* desired_name */
653 const gss_OID, /* desired_mech */
654 gss_cred_usage_t, /* cred_usage */
655 OM_uint32, /* initiator_time_req */
656 OM_uint32, /* acceptor_time_req */
657 gss_cred_id_t*, /* output_cred_handle */
658 gss_OID_set*, /* actual_mechs */
659 OM_uint32*, /* initiator_time_rec */
660 OM_uint32* /* acceptor_time_rec */
663 GSS_MAKE_TYPEDEF
664 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech)(
665 OM_uint32*, /* minor_status */
666 const gss_cred_id_t, /* cred_handle */
667 const gss_OID, /* mech_type */
668 gss_name_t*, /* name */
669 OM_uint32*, /* initiator_lifetime */
670 OM_uint32*, /* acceptor_lifetime */
671 gss_cred_usage_t* /* cred_usage */
674 GSS_MAKE_TYPEDEF
675 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_export_sec_context)(
676 OM_uint32*, /* minor_status */
677 gss_ctx_id_t*, /* context_handle */
678 gss_buffer_t /* interprocess_token */
681 GSS_MAKE_TYPEDEF
682 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_import_sec_context)(
683 OM_uint32*, /* minor_status */
684 const gss_buffer_t, /* interprocess_token */
685 gss_ctx_id_t* /* context_handle */
688 GSS_MAKE_TYPEDEF
689 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set)(
690 OM_uint32*, /* minor_status */
691 gss_OID_set* /* oid_set */
694 GSS_MAKE_TYPEDEF
695 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member)(
696 OM_uint32*, /* minor_status */
697 const gss_OID, /* member_oid */
698 gss_OID_set* /* oid_set */
701 GSS_MAKE_TYPEDEF
702 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member)(
703 OM_uint32*, /* minor_status */
704 const gss_OID, /* member */
705 const gss_OID_set, /* set */
706 int* /* present */
709 GSS_MAKE_TYPEDEF
710 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech)(
711 OM_uint32*, /* minor_status */
712 const gss_OID, /* mechanism */
713 gss_OID_set* /* name_types */
716 GSS_MAKE_TYPEDEF
717 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name)(
718 OM_uint32*, /* minor_status */
719 const gss_name_t, /* input_name */
720 gss_OID_set* /* mech_types */
723 GSS_MAKE_TYPEDEF
724 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_canonicalize_name)(
725 OM_uint32*, /* minor_status */
726 const gss_name_t, /* input_name */
727 const gss_OID, /* mech_type */
728 gss_name_t* /* output_name */
731 GSS_MAKE_TYPEDEF
732 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_duplicate_name)(
733 OM_uint32*, /* minor_status */
734 const gss_name_t, /* src_name */
735 gss_name_t* /* dest_name */
739 * The following routines are obsolete variants of gss_get_mic,
740 * gss_verify_mic, gss_wrap and gss_unwrap. They should be
741 * provided by GSSAPI V2 implementations for backwards
742 * compatibility with V1 applications. Distinct entrypoints
743 * (as opposed to #defines) should be provided, both to allow
744 * GSSAPI V1 applications to link against GSSAPI V2 implementations,
745 * and to retain the slight parameter type differences between the
746 * obsolete versions of these routines and their current forms.
749 GSS_MAKE_TYPEDEF
750 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_sign)(OM_uint32*, /* minor_status */
751 gss_ctx_id_t, /* context_handle */
752 int, /* qop_req */
753 gss_buffer_t, /* message_buffer */
754 gss_buffer_t /* message_token */
757 GSS_MAKE_TYPEDEF
758 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_verify)(OM_uint32*, /* minor_status */
759 gss_ctx_id_t, /* context_handle */
760 gss_buffer_t, /* message_buffer */
761 gss_buffer_t, /* token_buffer */
762 int* /* qop_state */
765 GSS_MAKE_TYPEDEF
766 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_seal)(
767 OM_uint32*, /* minor_status */
768 gss_ctx_id_t, /* context_handle */
769 int, /* conf_req_flag */
770 int, /* qop_req */
771 gss_buffer_t, /* input_message_buffer */
772 int*, /* conf_state */
773 gss_buffer_t /* output_message_buffer */
776 GSS_MAKE_TYPEDEF
777 OM_uint32 GSS_CALLCONV GSS_FUNC(gss_unseal)(
778 OM_uint32*, /* minor_status */
779 gss_ctx_id_t, /* context_handle */
780 gss_buffer_t, /* input_message_buffer */
781 gss_buffer_t, /* output_message_buffer */
782 int*, /* conf_state */
783 int* /* qop_state */
786 #if defined(XP_MACOSX) && !defined(__aarch64__)
787 # pragma pack(pop)
788 #endif
790 EXTERN_C_END
792 #endif /* GSSAPI_H_ */