1/*	$NetBSD: gssapi.h,v 1.2 2017/01/28 21:31:46 christos Exp $	*/
2
3/*
4 * Copyright (c) 1997 - 2007 Kungliga Tekniska H��gskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 *
19 * 3. Neither the name of the Institute nor the names of its contributors
20 *    may be used to endorse or promote products derived from this software
21 *    without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#ifndef GSSAPI_GSSAPI_H_
37#define GSSAPI_GSSAPI_H_
38
39/*
40 * First, include stddef.h to get size_t defined.
41 */
42#include <stddef.h>
43
44#include <krb5/krb5-types.h>
45
46#ifndef BUILD_GSSAPI_LIB
47#if defined(_WIN32)
48#define GSSAPI_LIB_FUNCTION __declspec(dllimport)
49#define GSSAPI_LIB_CALL     __stdcall
50#define GSSAPI_LIB_VARIABLE __declspec(dllimport)
51#else
52#define GSSAPI_LIB_FUNCTION
53#define GSSAPI_LIB_CALL
54#define GSSAPI_LIB_VARIABLE
55#endif
56#endif
57
58#ifndef GSSAPI_DEPRECATED_FUNCTION
59#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
60#define GSSAPI_DEPRECATED_FUNCTION(X) __attribute__((deprecated))
61#else
62#define GSSAPI_DEPRECATED_FUNCTION(X)
63#endif
64#endif
65
66/* Compatiblity with MIT Kerberos on the Mac */
67#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
68#pragma pack(push,2)
69#endif
70
71#ifdef __cplusplus
72#define GSSAPI_CPP_START	extern "C" {
73#define GSSAPI_CPP_END		}
74#else
75#define GSSAPI_CPP_START
76#define GSSAPI_CPP_END
77#endif
78
79#ifdef _WIN32
80#define GSSAPI_CALLCONV __stdcall
81#else
82#define GSSAPI_CALLCONV
83#endif
84
85/*
86 * Now define the three implementation-dependent types.
87 */
88
89typedef uint32_t OM_uint32;
90typedef uint64_t OM_uint64;
91
92typedef uint32_t gss_uint32;
93
94struct gss_name_t_desc_struct;
95typedef struct gss_name_t_desc_struct *gss_name_t;
96typedef const struct gss_name_t_desc_struct *gss_const_name_t;
97
98struct gss_ctx_id_t_desc_struct;
99typedef struct gss_ctx_id_t_desc_struct *gss_ctx_id_t;
100typedef const struct gss_ctx_id_t_desc_struct *gss_const_ctx_id_t;
101
102typedef struct gss_OID_desc_struct {
103      OM_uint32 length;
104      void      *elements;
105} gss_OID_desc, *gss_OID;
106typedef const gss_OID_desc * gss_const_OID;
107
108typedef struct gss_OID_set_desc_struct  {
109      size_t     count;
110      gss_OID    elements;
111} gss_OID_set_desc, *gss_OID_set;
112typedef const gss_OID_set_desc * gss_const_OID_set;
113
114typedef int gss_cred_usage_t;
115
116struct gss_cred_id_t_desc_struct;
117typedef struct gss_cred_id_t_desc_struct *gss_cred_id_t;
118typedef const struct gss_cred_id_t_desc_struct *gss_const_cred_id_t;
119
120typedef struct gss_buffer_desc_struct {
121      size_t length;
122      void *value;
123} gss_buffer_desc, *gss_buffer_t;
124typedef const gss_buffer_desc * gss_const_buffer_t;
125
126typedef struct gss_channel_bindings_struct {
127      OM_uint32 initiator_addrtype;
128      gss_buffer_desc initiator_address;
129      OM_uint32 acceptor_addrtype;
130      gss_buffer_desc acceptor_address;
131      gss_buffer_desc application_data;
132} *gss_channel_bindings_t;
133typedef const struct gss_channel_bindings_struct *gss_const_channel_bindings_t;
134
135/* GGF extension data types */
136typedef struct gss_buffer_set_desc_struct {
137      size_t count;
138      gss_buffer_desc *elements;
139} gss_buffer_set_desc, *gss_buffer_set_t;
140
141typedef struct gss_iov_buffer_desc_struct {
142    OM_uint32 type;
143    gss_buffer_desc buffer;
144} gss_iov_buffer_desc, *gss_iov_buffer_t;
145
146/*
147 * For now, define a QOP-type as an OM_uint32
148 */
149typedef OM_uint32 gss_qop_t;
150
151
152
153/*
154 * Flag bits for context-level services.
155 */
156#define GSS_C_DELEG_FLAG 1
157#define GSS_C_MUTUAL_FLAG 2
158#define GSS_C_REPLAY_FLAG 4
159#define GSS_C_SEQUENCE_FLAG 8
160#define GSS_C_CONF_FLAG 16
161#define GSS_C_INTEG_FLAG 32
162#define GSS_C_ANON_FLAG 64
163#define GSS_C_PROT_READY_FLAG 128
164#define GSS_C_TRANS_FLAG 256
165
166#define GSS_C_DCE_STYLE 4096
167#define GSS_C_IDENTIFY_FLAG 8192
168#define GSS_C_EXTENDED_ERROR_FLAG 16384
169#define GSS_C_DELEG_POLICY_FLAG 32768
170
171/*
172 * Credential usage options
173 */
174#define GSS_C_BOTH 0
175#define GSS_C_INITIATE 1
176#define GSS_C_ACCEPT 2
177
178/*
179 * Status code types for gss_display_status
180 */
181#define GSS_C_GSS_CODE 1
182#define GSS_C_MECH_CODE 2
183
184/*
185 * The constant definitions for channel-bindings address families
186 */
187#define GSS_C_AF_UNSPEC     0
188#define GSS_C_AF_LOCAL      1
189#define GSS_C_AF_INET       2
190#define GSS_C_AF_IMPLINK    3
191#define GSS_C_AF_PUP        4
192#define GSS_C_AF_CHAOS      5
193#define GSS_C_AF_NS         6
194#define GSS_C_AF_NBS        7
195#define GSS_C_AF_ECMA       8
196#define GSS_C_AF_DATAKIT    9
197#define GSS_C_AF_CCITT      10
198#define GSS_C_AF_SNA        11
199#define GSS_C_AF_DECnet     12
200#define GSS_C_AF_DLI        13
201#define GSS_C_AF_LAT        14
202#define GSS_C_AF_HYLINK     15
203#define GSS_C_AF_APPLETALK  16
204#define GSS_C_AF_BSC        17
205#define GSS_C_AF_DSS        18
206#define GSS_C_AF_OSI        19
207#define GSS_C_AF_X25        21
208#define GSS_C_AF_INET6	    24
209
210#define GSS_C_AF_NULLADDR   255
211
212/*
213 * Various Null values
214 */
215#define GSS_C_NO_NAME ((gss_name_t) 0)
216#define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
217#define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t) 0)
218#define GSS_C_NO_OID ((gss_OID) 0)
219#define GSS_C_NO_OID_SET ((gss_OID_set) 0)
220#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
221#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
222#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
223#define GSS_C_EMPTY_BUFFER {0, NULL}
224#define GSS_C_NO_IOV_BUFFER ((gss_iov_buffer_t)0)
225
226/*
227 * Some alternate names for a couple of the above
228 * values.  These are defined for V1 compatibility.
229 */
230#define GSS_C_NULL_OID GSS_C_NO_OID
231#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
232
233/*
234 * Define the default Quality of Protection for per-message
235 * services.  Note that an implementation that offers multiple
236 * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
237 * (as done here) to mean "default protection", or to a specific
238 * explicit QOP value.  However, a value of 0 should always be
239 * interpreted by a GSSAPI implementation as a request for the
240 * default protection level.
241 */
242#define GSS_C_QOP_DEFAULT 0
243
244#define GSS_KRB5_CONF_C_QOP_DES		0x0100
245#define GSS_KRB5_CONF_C_QOP_DES3_KD	0x0200
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 0xfffffffful
252
253/*
254 * Type of gss_wrap_iov()/gss_unwrap_iov().
255 */
256
257#define GSS_IOV_BUFFER_TYPE_EMPTY 0
258#define GSS_IOV_BUFFER_TYPE_DATA 1
259#define GSS_IOV_BUFFER_TYPE_HEADER 2
260#define GSS_IOV_BUFFER_TYPE_MECH_PARAMS 3
261
262#define GSS_IOV_BUFFER_TYPE_TRAILER 7
263#define GSS_IOV_BUFFER_TYPE_PADDING 9
264#define GSS_IOV_BUFFER_TYPE_STREAM 10
265#define GSS_IOV_BUFFER_TYPE_SIGN_ONLY 11
266
267#define GSS_IOV_BUFFER_TYPE_FLAG_MASK		0xffff0000
268#define GSS_IOV_BUFFER_FLAG_ALLOCATE		0x00010000
269#define GSS_IOV_BUFFER_FLAG_ALLOCATED		0x00020000
270
271#define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE	0x00010000 /* old name */
272#define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATED	0x00020000 /* old name */
273
274#define GSS_IOV_BUFFER_TYPE(_t) ((_t) & ~GSS_IOV_BUFFER_TYPE_FLAG_MASK)
275#define GSS_IOV_BUFFER_FLAGS(_t) ((_t) & GSS_IOV_BUFFER_TYPE_FLAG_MASK)
276
277GSSAPI_CPP_START
278
279#include <gssapi/gssapi_oid.h>
280
281/*
282 * The implementation must reserve static storage for a
283 * gss_OID_desc object containing the value
284 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
285 *              "\x01\x02\x01\x01"},
286 * corresponding to an object-identifier value of
287 * {iso(1) member-body(2) United States(840) mit(113554)
288 *  infosys(1) gssapi(2) generic(1) user_name(1)}.  The constant
289 * GSS_C_NT_USER_NAME should be initialized to point
290 * to that gss_OID_desc.
291 */
292extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_user_name_oid_desc;
293#define GSS_C_NT_USER_NAME (&__gss_c_nt_user_name_oid_desc)
294
295/*
296 * The implementation must reserve static storage for a
297 * gss_OID_desc object containing the value
298 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
299 *              "\x01\x02\x01\x02"},
300 * corresponding to an object-identifier value of
301 * {iso(1) member-body(2) United States(840) mit(113554)
302 *  infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
303 * The constant GSS_C_NT_MACHINE_UID_NAME should be
304 * initialized to point to that gss_OID_desc.
305 */
306extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_machine_uid_name_oid_desc;
307#define GSS_C_NT_MACHINE_UID_NAME (&__gss_c_nt_machine_uid_name_oid_desc)
308
309/*
310 * The implementation must reserve static storage for a
311 * gss_OID_desc object containing the value
312 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
313 *              "\x01\x02\x01\x03"},
314 * corresponding to an object-identifier value of
315 * {iso(1) member-body(2) United States(840) mit(113554)
316 *  infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
317 * The constant GSS_C_NT_STRING_UID_NAME should be
318 * initialized to point to that gss_OID_desc.
319 */
320extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_string_uid_name_oid_desc;
321#define GSS_C_NT_STRING_UID_NAME (&__gss_c_nt_string_uid_name_oid_desc)
322
323/*
324 * The implementation must reserve static storage for a
325 * gss_OID_desc object containing the value
326 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
327 * corresponding to an object-identifier value of
328 * {iso(1) org(3) dod(6) internet(1) security(5)
329 * nametypes(6) gss-host-based-services(2)).  The constant
330 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
331 * to that gss_OID_desc.  This is a deprecated OID value, and
332 * implementations wishing to support hostbased-service names
333 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
334 * defined below, to identify such names;
335 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
336 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
337 * parameter, but should not be emitted by GSS-API
338 * implementations
339 */
340extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_x_oid_desc;
341#define GSS_C_NT_HOSTBASED_SERVICE_X (&__gss_c_nt_hostbased_service_x_oid_desc)
342
343/*
344 * The implementation must reserve static storage for a
345 * gss_OID_desc object containing the value
346 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
347 *              "\x01\x02\x01\x04"}, corresponding to an
348 * object-identifier value of {iso(1) member-body(2)
349 * Unites States(840) mit(113554) infosys(1) gssapi(2)
350 * generic(1) service_name(4)}.  The constant
351 * GSS_C_NT_HOSTBASED_SERVICE should be initialized
352 * to point to that gss_OID_desc.
353 */
354extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_oid_desc;
355#define GSS_C_NT_HOSTBASED_SERVICE (&__gss_c_nt_hostbased_service_oid_desc)
356
357/*
358 * The implementation must reserve static storage for a
359 * gss_OID_desc object containing the value
360 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
361 * corresponding to an object identifier value of
362 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
363 * 6(nametypes), 3(gss-anonymous-name)}.  The constant
364 * and GSS_C_NT_ANONYMOUS should be initialized to point
365 * to that gss_OID_desc.
366 */
367extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_anonymous_oid_desc;
368#define GSS_C_NT_ANONYMOUS (&__gss_c_nt_anonymous_oid_desc)
369
370/*
371 * The implementation must reserve static storage for a
372 * gss_OID_desc object containing the value
373 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
374 * corresponding to an object-identifier value of
375 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
376 * 6(nametypes), 4(gss-api-exported-name)}.  The constant
377 * GSS_C_NT_EXPORT_NAME should be initialized to point
378 * to that gss_OID_desc.
379 */
380extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_export_name_oid_desc;
381#define GSS_C_NT_EXPORT_NAME (&__gss_c_nt_export_name_oid_desc)
382
383/* Major status codes */
384
385#define GSS_S_COMPLETE 0
386
387/*
388 * Some "helper" definitions to make the status code macros obvious.
389 */
390#define GSS_C_CALLING_ERROR_OFFSET 24
391#define GSS_C_ROUTINE_ERROR_OFFSET 16
392#define GSS_C_SUPPLEMENTARY_OFFSET 0
393#define GSS_C_CALLING_ERROR_MASK 0377ul
394#define GSS_C_ROUTINE_ERROR_MASK 0377ul
395#define GSS_C_SUPPLEMENTARY_MASK 0177777ul
396
397/*
398 * The macros that test status codes for error conditions.
399 * Note that the GSS_ERROR() macro has changed slightly from
400 * the V1 GSSAPI so that it now evaluates its argument
401 * only once.
402 */
403#define GSS_CALLING_ERROR(x) \
404  (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
405#define GSS_ROUTINE_ERROR(x) \
406  (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
407#define GSS_SUPPLEMENTARY_INFO(x) \
408  (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
409#define GSS_ERROR(x) \
410  (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
411        (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
412
413/*
414 * Now the actual status code definitions
415 */
416
417/*
418 * Calling errors:
419 */
420#define GSS_S_CALL_INACCESSIBLE_READ \
421                             (1ul << GSS_C_CALLING_ERROR_OFFSET)
422#define GSS_S_CALL_INACCESSIBLE_WRITE \
423                             (2ul << GSS_C_CALLING_ERROR_OFFSET)
424#define GSS_S_CALL_BAD_STRUCTURE \
425                             (3ul << GSS_C_CALLING_ERROR_OFFSET)
426
427/*
428 * Routine errors:
429 */
430#define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
431#define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
432#define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
433
434#define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
435#define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
436#define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
437#define GSS_S_BAD_MIC GSS_S_BAD_SIG
438#define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
439#define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
440#define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
441#define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
442#define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
443#define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
444#define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
445#define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
446#define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
447#define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
448#define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
449#define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
450#define GSS_S_BAD_MECH_ATTR (19ul << GSS_C_ROUTINE_ERROR_OFFSET)
451
452/*
453 * Apparently awating spec fix.
454 */
455#define GSS_S_CRED_UNAVAIL GSS_S_FAILURE
456
457/*
458 * Supplementary info bits:
459 */
460#define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
461#define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
462#define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
463#define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
464#define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
465
466/*
467 * Finally, function prototypes for the GSS-API routines.
468 */
469
470#define GSS_C_OPTION_MASK 0xffff
471#define GSS_C_CRED_NO_UI  0x10000
472
473GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred
474           (OM_uint32 * /*minor_status*/,
475            gss_const_name_t /*desired_name*/,
476            OM_uint32 /*time_req*/,
477            const gss_OID_set /*desired_mechs*/,
478            gss_cred_usage_t /*cred_usage*/,
479            gss_cred_id_t * /*output_cred_handle*/,
480            gss_OID_set * /*actual_mechs*/,
481            OM_uint32 * /*time_rec*/
482           );
483
484GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred
485           (OM_uint32 * /*minor_status*/,
486            gss_cred_id_t * /*cred_handle*/
487           );
488
489GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context
490           (OM_uint32 * /*minor_status*/,
491            gss_const_cred_id_t /*initiator_cred_handle*/,
492            gss_ctx_id_t * /*context_handle*/,
493            gss_const_name_t /*target_name*/,
494            const gss_OID /*mech_type*/,
495            OM_uint32 /*req_flags*/,
496            OM_uint32 /*time_req*/,
497            const gss_channel_bindings_t /*input_chan_bindings*/,
498            const gss_buffer_t /*input_token*/,
499            gss_OID * /*actual_mech_type*/,
500            gss_buffer_t /*output_token*/,
501            OM_uint32 * /*ret_flags*/,
502            OM_uint32 * /*time_rec*/
503           );
504
505GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_accept_sec_context
506           (OM_uint32 * /*minor_status*/,
507            gss_ctx_id_t * /*context_handle*/,
508            gss_const_cred_id_t /*acceptor_cred_handle*/,
509            const gss_buffer_t /*input_token_buffer*/,
510            const gss_channel_bindings_t /*input_chan_bindings*/,
511            gss_name_t * /*src_name*/,
512            gss_OID * /*mech_type*/,
513            gss_buffer_t /*output_token*/,
514            OM_uint32 * /*ret_flags*/,
515            OM_uint32 * /*time_rec*/,
516            gss_cred_id_t * /*delegated_cred_handle*/
517           );
518
519GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_process_context_token
520           (OM_uint32 * /*minor_status*/,
521            gss_const_ctx_id_t /*context_handle*/,
522            const gss_buffer_t /*token_buffer*/
523           );
524
525GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_sec_context
526           (OM_uint32 * /*minor_status*/,
527            gss_ctx_id_t * /*context_handle*/,
528            gss_buffer_t /*output_token*/
529           );
530
531GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_time
532           (OM_uint32 * /*minor_status*/,
533            gss_const_ctx_id_t /*context_handle*/,
534            OM_uint32 * /*time_rec*/
535           );
536
537GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_mic
538           (OM_uint32 * /*minor_status*/,
539            gss_const_ctx_id_t /*context_handle*/,
540            gss_qop_t /*qop_req*/,
541            const gss_buffer_t /*message_buffer*/,
542            gss_buffer_t /*message_token*/
543           );
544
545GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify_mic
546           (OM_uint32 * /*minor_status*/,
547            gss_const_ctx_id_t /*context_handle*/,
548            const gss_buffer_t /*message_buffer*/,
549            const gss_buffer_t /*token_buffer*/,
550            gss_qop_t * /*qop_state*/
551           );
552
553GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap
554           (OM_uint32 * /*minor_status*/,
555            gss_const_ctx_id_t /*context_handle*/,
556            int /*conf_req_flag*/,
557            gss_qop_t /*qop_req*/,
558            const gss_buffer_t /*input_message_buffer*/,
559            int * /*conf_state*/,
560            gss_buffer_t /*output_message_buffer*/
561           );
562
563GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap
564           (OM_uint32 * /*minor_status*/,
565            gss_const_ctx_id_t /*context_handle*/,
566            const gss_buffer_t /*input_message_buffer*/,
567            gss_buffer_t /*output_message_buffer*/,
568            int * /*conf_state*/,
569            gss_qop_t * /*qop_state*/
570           );
571
572GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_status
573           (OM_uint32 * /*minor_status*/,
574            OM_uint32 /*status_value*/,
575            int /*status_type*/,
576            const gss_OID /*mech_type*/,
577            OM_uint32 * /*message_context*/,
578            gss_buffer_t /*status_string*/
579           );
580
581GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_indicate_mechs
582           (OM_uint32 * /*minor_status*/,
583            gss_OID_set * /*mech_set*/
584           );
585
586GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_compare_name
587           (OM_uint32 * /*minor_status*/,
588            gss_const_name_t /*name1*/,
589            gss_const_name_t /*name2*/,
590            int * /*name_equal*/
591           );
592
593GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name
594           (OM_uint32 * /*minor_status*/,
595            gss_const_name_t /*input_name*/,
596            gss_buffer_t /*output_name_buffer*/,
597            gss_OID * /*output_name_type*/
598           );
599
600GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name
601           (OM_uint32 * /*minor_status*/,
602            const gss_buffer_t /*input_name_buffer*/,
603            const gss_OID /*input_name_type*/,
604            gss_name_t * /*output_name*/
605           );
606
607GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name
608           (OM_uint32  * /*minor_status*/,
609            gss_const_name_t /*input_name*/,
610            gss_buffer_t /*exported_name*/
611           );
612
613GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name
614           (OM_uint32 * /*minor_status*/,
615            gss_name_t * /*input_name*/
616           );
617
618GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer
619           (OM_uint32 * /*minor_status*/,
620            gss_buffer_t /*buffer*/
621           );
622
623GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid_set
624           (OM_uint32 * /*minor_status*/,
625            gss_OID_set * /*set*/
626           );
627
628GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred
629           (OM_uint32 * /*minor_status*/,
630            gss_const_cred_id_t /*cred_handle*/,
631            gss_name_t * /*name*/,
632            OM_uint32 * /*lifetime*/,
633            gss_cred_usage_t * /*cred_usage*/,
634            gss_OID_set * /*mechanisms*/
635           );
636
637GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_context (
638            OM_uint32 * /*minor_status*/,
639            gss_const_ctx_id_t /*context_handle*/,
640            gss_name_t * /*src_name*/,
641            gss_name_t * /*targ_name*/,
642            OM_uint32 * /*lifetime_rec*/,
643            gss_OID * /*mech_type*/,
644            OM_uint32 * /*ctx_flags*/,
645            int * /*locally_initiated*/,
646            int * /*open_context*/
647           );
648
649GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_size_limit (
650            OM_uint32 * /*minor_status*/,
651            gss_const_ctx_id_t /*context_handle*/,
652            int /*conf_req_flag*/,
653            gss_qop_t /*qop_req*/,
654            OM_uint32 /*req_output_size*/,
655            OM_uint32 * /*max_input_size*/
656           );
657
658GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred (
659            OM_uint32 * /*minor_status*/,
660            gss_const_cred_id_t /*input_cred_handle*/,
661            gss_const_name_t /*desired_name*/,
662            const gss_OID /*desired_mech*/,
663            gss_cred_usage_t /*cred_usage*/,
664            OM_uint32 /*initiator_time_req*/,
665            OM_uint32 /*acceptor_time_req*/,
666            gss_cred_id_t * /*output_cred_handle*/,
667            gss_OID_set * /*actual_mechs*/,
668            OM_uint32 * /*initiator_time_rec*/,
669            OM_uint32 * /*acceptor_time_rec*/
670           );
671
672GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_mech (
673            OM_uint32 * /*minor_status*/,
674            gss_const_cred_id_t /*cred_handle*/,
675            const gss_OID /*mech_type*/,
676            gss_name_t * /*name*/,
677            OM_uint32 * /*initiator_lifetime*/,
678            OM_uint32 * /*acceptor_lifetime*/,
679            gss_cred_usage_t * /*cred_usage*/
680           );
681
682GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_sec_context (
683            OM_uint32 * /*minor_status*/,
684            gss_ctx_id_t * /*context_handle*/,
685            gss_buffer_t /*interprocess_token*/
686           );
687
688GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_sec_context (
689            OM_uint32 * /*minor_status*/,
690            const gss_buffer_t /*interprocess_token*/,
691            gss_ctx_id_t * /*context_handle*/
692           );
693
694GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_oid_set (
695            OM_uint32 * /*minor_status*/,
696            gss_OID_set * /*oid_set*/
697           );
698
699GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member (
700            OM_uint32 * /*minor_status*/,
701            const gss_OID /*member_oid*/,
702            gss_OID_set * /*oid_set*/
703           );
704
705GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_test_oid_set_member (
706            OM_uint32 * /*minor_status*/,
707            const gss_OID /*member*/,
708            const gss_OID_set /*set*/,
709            int * /*present*/
710           );
711
712GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_names_for_mech (
713            OM_uint32 * /*minor_status*/,
714            const gss_OID /*mechanism*/,
715            gss_OID_set * /*name_types*/
716           );
717
718GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_mechs_for_name (
719            OM_uint32 * /*minor_status*/,
720            gss_const_name_t /*input_name*/,
721            gss_OID_set * /*mech_types*/
722           );
723
724GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name (
725            OM_uint32 * /*minor_status*/,
726            gss_const_name_t /*input_name*/,
727            const gss_OID /*mech_type*/,
728            gss_name_t * /*output_name*/
729           );
730
731GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_name (
732            OM_uint32 * /*minor_status*/,
733            gss_const_name_t /*src_name*/,
734            gss_name_t * /*dest_name*/
735           );
736
737GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_oid (
738	    OM_uint32 * /* minor_status */,
739	    gss_OID /* src_oid */,
740	    gss_OID * /* dest_oid */
741           );
742
743GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
744gss_release_oid
745	(OM_uint32 * /*minor_status*/,
746	 gss_OID * /* oid */
747	);
748
749GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
750gss_oid_to_str(
751	    OM_uint32 * /*minor_status*/,
752	    gss_OID /* oid */,
753	    gss_buffer_t /* str */
754           );
755
756GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
757gss_inquire_sec_context_by_oid(
758	    OM_uint32 * minor_status,
759            gss_const_ctx_id_t context_handle,
760            const gss_OID desired_object,
761            gss_buffer_set_t *data_set
762           );
763
764GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
765gss_set_sec_context_option (OM_uint32 *minor_status,
766			    gss_ctx_id_t *context_handle,
767			    const gss_OID desired_object,
768			    const gss_buffer_t value);
769
770GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
771gss_set_cred_option (OM_uint32 *minor_status,
772		     gss_cred_id_t *cred_handle,
773		     const gss_OID object,
774		     const gss_buffer_t value);
775
776GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
777gss_oid_equal(gss_const_OID a, gss_const_OID b);
778
779GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
780gss_create_empty_buffer_set
781	   (OM_uint32 * minor_status,
782	    gss_buffer_set_t *buffer_set);
783
784GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
785gss_add_buffer_set_member
786	   (OM_uint32 * minor_status,
787	    const gss_buffer_t member_buffer,
788	    gss_buffer_set_t *buffer_set);
789
790GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
791gss_release_buffer_set
792	   (OM_uint32 * minor_status,
793	    gss_buffer_set_t *buffer_set);
794
795GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
796gss_inquire_cred_by_oid(OM_uint32 *minor_status,
797	                gss_const_cred_id_t cred_handle,
798	                const gss_OID desired_object,
799	                gss_buffer_set_t *data_set);
800
801/*
802 * RFC 4401
803 */
804
805#define GSS_C_PRF_KEY_FULL 0
806#define GSS_C_PRF_KEY_PARTIAL 1
807
808GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
809gss_pseudo_random
810	(OM_uint32 *minor_status,
811	 gss_ctx_id_t context,
812	 int prf_key,
813	 const gss_buffer_t prf_in,
814	 ssize_t desired_output_len,
815	 gss_buffer_t prf_out
816	);
817
818GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
819gss_store_cred(OM_uint32         * /* minor_status */,
820	       gss_cred_id_t     /* input_cred_handle */,
821	       gss_cred_usage_t  /* cred_usage */,
822	       const gss_OID     /* desired_mech */,
823	       OM_uint32         /* overwrite_cred */,
824	       OM_uint32         /* default_cred */,
825	       gss_OID_set       * /* elements_stored */,
826	       gss_cred_usage_t  * /* cred_usage_stored */);
827
828
829/*
830 * Query functions
831 */
832
833typedef struct {
834    size_t header; /**< size of header */
835    size_t trailer; /**< size of trailer */
836    size_t max_msg_size; /**< maximum message size */
837    size_t buffers; /**< extra GSS_IOV_BUFFER_TYPE_EMPTY buffer to pass */
838    size_t blocksize; /**< Specificed optimal size of messages, also
839			 is the maximum padding size
840			 (GSS_IOV_BUFFER_TYPE_PADDING) */
841} gss_context_stream_sizes;
842
843extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_attr_stream_sizes_oid_desc;
844#define GSS_C_ATTR_STREAM_SIZES (&__gss_c_attr_stream_sizes_oid_desc)
845
846
847GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
848gss_context_query_attributes(OM_uint32 * /* minor_status */,
849			     gss_const_ctx_id_t /* context_handle */,
850			     const gss_OID /* attribute */,
851			     void * /*data*/,
852			     size_t /* len */);
853/*
854 * The following routines are obsolete variants of gss_get_mic,
855 * gss_verify_mic, gss_wrap and gss_unwrap.  They should be
856 * provided by GSSAPI V2 implementations for backwards
857 * compatibility with V1 applications.  Distinct entrypoints
858 * (as opposed to #defines) should be provided, both to allow
859 * GSSAPI V1 applications to link against GSSAPI V2 implementations,
860 * and to retain the slight parameter type differences between the
861 * obsolete versions of these routines and their current forms.
862 */
863
864GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign
865           (OM_uint32 * /*minor_status*/,
866            gss_ctx_id_t /*context_handle*/,
867            int /*qop_req*/,
868            gss_buffer_t /*message_buffer*/,
869            gss_buffer_t /*message_token*/
870	    ) GSSAPI_DEPRECATED_FUNCTION("Use gss_get_mic");
871
872GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify
873           (OM_uint32 * /*minor_status*/,
874            gss_ctx_id_t /*context_handle*/,
875            gss_buffer_t /*message_buffer*/,
876            gss_buffer_t /*token_buffer*/,
877            int * /*qop_state*/
878	    ) GSSAPI_DEPRECATED_FUNCTION("Use gss_verify_mic");
879
880GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal
881           (OM_uint32 * /*minor_status*/,
882            gss_ctx_id_t /*context_handle*/,
883            int /*conf_req_flag*/,
884            int /*qop_req*/,
885            gss_buffer_t /*input_message_buffer*/,
886            int * /*conf_state*/,
887            gss_buffer_t /*output_message_buffer*/
888           ) GSSAPI_DEPRECATED_FUNCTION("Use gss_wrap");
889
890GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal
891           (OM_uint32 * /*minor_status*/,
892            gss_ctx_id_t /*context_handle*/,
893            gss_buffer_t /*input_message_buffer*/,
894            gss_buffer_t /*output_message_buffer*/,
895            int * /*conf_state*/,
896            int * /*qop_state*/
897           )  GSSAPI_DEPRECATED_FUNCTION("Use gss_unwrap");
898
899/**
900 *
901 */
902
903GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
904gss_encapsulate_token(gss_const_buffer_t /* input_token */,
905		      gss_const_OID /* oid */,
906		      gss_buffer_t /* output_token */);
907
908GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
909gss_decapsulate_token(gss_const_buffer_t /* input_token */,
910		      gss_const_OID /* oid */,
911		      gss_buffer_t /* output_token */);
912
913
914
915/*
916 * AEAD support
917 */
918
919/*
920 * GSS_IOV
921 */
922
923GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
924gss_wrap_iov(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *,
925	     gss_iov_buffer_desc *, int);
926
927
928GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
929gss_unwrap_iov(OM_uint32 *, gss_ctx_id_t, int *, gss_qop_t *,
930	       gss_iov_buffer_desc *, int);
931
932GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
933gss_wrap_iov_length(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *,
934		    gss_iov_buffer_desc *, int);
935
936GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
937gss_release_iov_buffer(OM_uint32 *, gss_iov_buffer_desc *, int);
938
939GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
940gss_wrap_aead(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t,
941	      gss_buffer_t, gss_buffer_t, int *, gss_buffer_t);
942
943GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
944gss_unwrap_aead(OM_uint32 *, gss_ctx_id_t, gss_buffer_t,
945		gss_buffer_t, gss_buffer_t, int *, gss_qop_t *);
946
947GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
948gss_export_cred(OM_uint32 * /* minor_status */,
949		gss_cred_id_t /* cred_handle */,
950		gss_buffer_t /* cred_token */);
951
952GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
953gss_import_cred(OM_uint32 * /* minor_status */,
954		gss_buffer_t /* cred_token */,
955		gss_cred_id_t * /* cred_handle */);
956
957/*
958 * mech option
959 */
960
961GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
962gss_mo_set(gss_const_OID mech, gss_const_OID option,
963	   int enable, gss_buffer_t value);
964
965GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
966gss_mo_get(gss_const_OID mech, gss_const_OID option, gss_buffer_t value);
967
968GSSAPI_LIB_FUNCTION void GSSAPI_LIB_CALL
969gss_mo_list(gss_const_OID mech, gss_OID_set *options);
970
971GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
972gss_mo_name(gss_const_OID mech, gss_const_OID options, gss_buffer_t name);
973
974/*
975 * SASL glue functions and mech inquire
976 */
977
978GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
979gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
980			      const gss_OID desired_mech,
981			      gss_buffer_t sasl_mech_name,
982			      gss_buffer_t mech_name,
983			      gss_buffer_t mech_description);
984
985GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
986gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
987			      const gss_buffer_t sasl_mech_name,
988			      gss_OID *mech_type);
989
990GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
991gss_indicate_mechs_by_attrs(OM_uint32 * minor_status,
992			    gss_const_OID_set desired_mech_attrs,
993			    gss_const_OID_set except_mech_attrs,
994			    gss_const_OID_set critical_mech_attrs,
995			    gss_OID_set *mechs);
996
997GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
998gss_inquire_attrs_for_mech(OM_uint32 * minor_status,
999			   gss_const_OID mech,
1000			   gss_OID_set *mech_attr,
1001			   gss_OID_set *known_mech_attrs);
1002
1003GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
1004gss_display_mech_attr(OM_uint32 * minor_status,
1005		      gss_const_OID mech_attr,
1006		      gss_buffer_t name,
1007		      gss_buffer_t short_desc,
1008		      gss_buffer_t long_desc);
1009
1010/*
1011 * Solaris compat
1012 */
1013
1014GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred_with_password
1015           (OM_uint32 * /*minor_status*/,
1016            gss_const_name_t /*desired_name*/,
1017            const gss_buffer_t /*password*/,
1018            OM_uint32 /*time_req*/,
1019            const gss_OID_set /*desired_mechs*/,
1020            gss_cred_usage_t /*cred_usage*/,
1021            gss_cred_id_t * /*output_cred_handle*/,
1022            gss_OID_set * /*actual_mechs*/,
1023            OM_uint32 * /*time_rec*/
1024           );
1025
1026GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred_with_password (
1027            OM_uint32 * /*minor_status*/,
1028            gss_const_cred_id_t /*input_cred_handle*/,
1029            gss_const_name_t /*desired_name*/,
1030            const gss_OID /*desired_mech*/,
1031            const gss_buffer_t /*password*/,
1032            gss_cred_usage_t /*cred_usage*/,
1033            OM_uint32 /*initiator_time_req*/,
1034            OM_uint32 /*acceptor_time_req*/,
1035            gss_cred_id_t * /*output_cred_handle*/,
1036            gss_OID_set * /*actual_mechs*/,
1037            OM_uint32 * /*initiator_time_rec*/,
1038            OM_uint32 * /*acceptor_time_rec*/
1039           );
1040
1041GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
1042gss_localname(
1043        OM_uint32 *minor,
1044        gss_const_name_t name,
1045        const gss_OID mech_type,
1046        gss_buffer_t localname);
1047
1048GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
1049gss_pname_to_uid(
1050        OM_uint32 *minor,
1051        gss_const_name_t name,
1052        const gss_OID mech_type,
1053        uid_t *uidOut);
1054
1055GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
1056gss_authorize_localname(
1057        OM_uint32 *minor,
1058        gss_const_name_t name,
1059        gss_const_name_t user);
1060
1061GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL
1062gss_userok(gss_const_name_t name,
1063           const char *user);
1064
1065extern GSSAPI_LIB_VARIABLE gss_buffer_desc __gss_c_attr_local_login_user;
1066#define GSS_C_ATTR_LOCAL_LOGIN_USER (&__gss_c_attr_local_login_user)
1067
1068/*
1069 * Naming extensions
1070 */
1071
1072GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name_ext (
1073    OM_uint32 *,	/* minor_status */
1074    gss_name_t,		/* name */
1075    gss_OID,		/* display_as_name_type */
1076    gss_buffer_t	/* display_name */
1077    );
1078
1079GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_name (
1080    OM_uint32 *,	/* minor_status */
1081    gss_name_t,		/* name */
1082    int *,		/* name_is_MN */
1083    gss_OID *,		/* MN_mech */
1084    gss_buffer_set_t *	/* attrs */
1085    );
1086
1087GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_name_attribute (
1088    OM_uint32 *,	/* minor_status */
1089    gss_name_t,		/* name */
1090    gss_buffer_t,	/* attr */
1091    int *,		/* authenticated */
1092    int *,		/* complete */
1093    gss_buffer_t,	/* value */
1094    gss_buffer_t,	/* display_value */
1095    int *		/* more */
1096    );
1097
1098GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_name_attribute (
1099    OM_uint32 *,	/* minor_status */
1100    gss_name_t,		/* name */
1101    int,		/* complete */
1102    gss_buffer_t,	/* attr */
1103    gss_buffer_t	/* value */
1104    );
1105
1106GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_name_attribute (
1107    OM_uint32 *,	/* minor_status */
1108    gss_name_t,		/* name */
1109    gss_buffer_t	/* attr */
1110    );
1111
1112GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name_composite (
1113    OM_uint32 *,	/* minor_status */
1114    gss_name_t,		/* name */
1115    gss_buffer_t	/* exp_composite_name */
1116    );
1117
1118/*
1119 *
1120 */
1121
1122GSSAPI_LIB_FUNCTION const char * GSSAPI_LIB_CALL
1123gss_oid_to_name(gss_const_OID oid);
1124
1125GSSAPI_LIB_FUNCTION gss_OID GSSAPI_LIB_CALL
1126gss_name_to_oid(const char *name);
1127
1128GSSAPI_CPP_END
1129
1130#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
1131#pragma pack(pop)
1132#endif
1133
1134#undef GSSAPI_DEPRECATED_FUNCTION
1135
1136#endif /* GSSAPI_GSSAPI_H_ */
1137