2 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 #include <mach/std_types.defs>
30 #include <mach/mach_types.defs>
33 import <gssd/gssd_mach_types.h>;
35 import <System/gssd/gssd_mach_types.h>;
38 type gssd_mechtype = int32_t;
39 type gssd_nametype = int32_t;
40 type gssd_string = c_string[*:1024]; /* MAX_PRINC_STR must be < 1024 */
41 type gssd_dstring = c_string[*:128]; /* MAX_DISPLAY_STR must be < 128 */
42 type gssd_byte_buffer = array [] of uint8_t;
43 type gssd_verifier = uint64_t;
44 type gssd_gid_list = array [*:16] of uint32_t;
45 type gssd_ctx = uint64_t;
46 type gssd_cred = uint64_t;
56 routine mach_gss_init_sec_context(
58 in mech : gssd_mechtype;
59 in intoken : gssd_byte_buffer;
61 in princ_namestr : gssd_string;
62 in svc_namestr : gssd_string;
64 in gssd_flags : uint32_t;
65 inout context : gssd_ctx;
66 inout cred_handle : gssd_cred;
67 out ret_flags : uint32_t;
68 out key : gssd_byte_buffer, dealloc;
69 out outtoken : gssd_byte_buffer, dealloc;
70 out major_stat : uint32_t;
71 out minor_stat : uint32_t
74 routine mach_gss_accept_sec_context(
76 in intoken : gssd_byte_buffer;
77 in svc_namestr : gssd_string;
78 in gssd_flags : uint32_t;
79 inout context : gssd_ctx;
80 inout cred_handle : gssd_cred;
83 out gids : gssd_gid_list;
84 out key : gssd_byte_buffer, dealloc;
85 out outtoken : gssd_byte_buffer, dealloc;
86 out major_stat : uint32_t;
87 out minor_stat : uint32_t
90 simpleroutine mach_gss_log_error(
94 in source : gssd_string;
95 in major_stat : uint32_t;
96 in minor_stat : uint32_t
99 routine mach_gss_init_sec_context_v2(
100 server : mach_port_t;
101 in mech : gssd_mechtype;
102 in intoken : gssd_byte_buffer;
104 in clnt_nt : gssd_nametype;
105 in clnt_princ : gssd_byte_buffer;
106 in svc_nt : gssd_nametype;
107 in svc_princ : gssd_byte_buffer;
109 inout gssd_flags : uint32_t;
110 inout context : gssd_ctx;
111 inout cred_handle : gssd_cred;
112 out ret_flags : uint32_t;
113 out key : gssd_byte_buffer, dealloc;
114 out outtoken : gssd_byte_buffer, dealloc;
115 out displayname : gssd_dstring;
116 out major_stat : uint32_t;
117 out minor_stat : uint32_t
120 routine mach_gss_accept_sec_context_v2(
121 server : mach_port_t;
122 in intoken : gssd_byte_buffer;
123 in svc_nt : gssd_nametype;
124 in svc_princ : gssd_byte_buffer;
125 inout gssd_flags : uint32_t;
126 inout context : gssd_ctx;
127 inout cred_handle : gssd_cred;
128 out flags : uint32_t;
130 out gids : gssd_gid_list;
131 out key : gssd_byte_buffer, dealloc;
132 out outtoken : gssd_byte_buffer, dealloc;
133 out major_stat : uint32_t;
134 out minor_stat : uint32_t
137 routine mach_gss_hold_cred(
138 server : mach_port_t;
139 in mech : gssd_mechtype;
140 in nt : gssd_nametype;
141 in princ : gssd_byte_buffer;
142 out major_stat : uint32_t;
143 out minor_stat : uint32_t
146 routine mach_gss_unhold_cred(
147 server : mach_port_t;
148 in mech : gssd_mechtype;
149 in nt : gssd_nametype;
150 in princ : gssd_byte_buffer;
151 out major_stat : uint32_t;
152 out minor_stat : uint32_t