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