2
|
1 |
/*
|
5506
|
2 |
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
2
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
5506
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
2
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5506
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
2
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
5506
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
2
|
24 |
*/
|
|
25 |
|
|
26 |
/* This is the gssapi.h prologue. */
|
|
27 |
/* It contains some choice pieces of autoconf.h */
|
|
28 |
#define GSS_SIZEOF_INT 4
|
|
29 |
#define GSS_SIZEOF_LONG 4
|
|
30 |
#define GSS_SIZEOF_SHORT 2
|
|
31 |
|
|
32 |
#ifndef _GSSAPI_H_
|
|
33 |
#define _GSSAPI_H_
|
|
34 |
|
|
35 |
#ifdef __cplusplus
|
|
36 |
extern "C" {
|
|
37 |
#endif /* __cplusplus */
|
|
38 |
|
|
39 |
/*
|
|
40 |
* First, include stddef.h to get size_t defined.
|
|
41 |
*/
|
|
42 |
#include <stddef.h>
|
|
43 |
|
|
44 |
/*
|
|
45 |
* POSIX says that sys/types.h is where size_t is defined.
|
|
46 |
*/
|
|
47 |
#include <sys/types.h>
|
|
48 |
|
|
49 |
typedef void * gss_name_t;
|
|
50 |
typedef void * gss_cred_id_t;
|
|
51 |
typedef void * gss_ctx_id_t;
|
|
52 |
|
|
53 |
/*
|
|
54 |
* The following type must be defined as the smallest natural unsigned integer
|
|
55 |
* supported by the platform that has at least 32 bits of precision.
|
|
56 |
*/
|
|
57 |
#if (GSS_SIZEOF_SHORT == 4)
|
|
58 |
typedef unsigned short gss_uint32;
|
|
59 |
typedef short gss_int32;
|
|
60 |
#elif (GSS_SIZEOF_INT == 4)
|
|
61 |
typedef unsigned int gss_uint32;
|
|
62 |
typedef int gss_int32;
|
|
63 |
#elif (GSS_SIZEOF_LONG == 4)
|
|
64 |
typedef unsigned long gss_uint32;
|
|
65 |
typedef long gss_int32;
|
|
66 |
#endif
|
|
67 |
|
|
68 |
typedef gss_uint32 OM_uint32;
|
|
69 |
|
|
70 |
typedef struct gss_OID_desc_struct {
|
|
71 |
OM_uint32 length;
|
|
72 |
void *elements;
|
|
73 |
} gss_OID_desc, *gss_OID;
|
|
74 |
|
|
75 |
typedef struct gss_OID_set_desc_struct {
|
|
76 |
size_t count;
|
|
77 |
gss_OID elements;
|
|
78 |
} gss_OID_set_desc, *gss_OID_set;
|
|
79 |
|
|
80 |
typedef struct gss_buffer_desc_struct {
|
|
81 |
size_t length;
|
|
82 |
void *value;
|
|
83 |
} gss_buffer_desc, *gss_buffer_t;
|
|
84 |
|
|
85 |
typedef struct gss_channel_bindings_struct {
|
|
86 |
OM_uint32 initiator_addrtype;
|
|
87 |
gss_buffer_desc initiator_address;
|
|
88 |
OM_uint32 acceptor_addrtype;
|
|
89 |
gss_buffer_desc acceptor_address;
|
|
90 |
gss_buffer_desc application_data;
|
|
91 |
} *gss_channel_bindings_t;
|
|
92 |
|
|
93 |
/*
|
|
94 |
* For now, define a QOP-type as an OM_uint32
|
|
95 |
*/
|
|
96 |
typedef OM_uint32 gss_qop_t;
|
|
97 |
typedef int gss_cred_usage_t;
|
|
98 |
|
|
99 |
/*
|
|
100 |
* Flag bits for context-level services.
|
|
101 |
*/
|
|
102 |
#define GSS_C_DELEG_FLAG 1
|
|
103 |
#define GSS_C_MUTUAL_FLAG 2
|
|
104 |
#define GSS_C_REPLAY_FLAG 4
|
|
105 |
#define GSS_C_SEQUENCE_FLAG 8
|
|
106 |
#define GSS_C_CONF_FLAG 16
|
|
107 |
#define GSS_C_INTEG_FLAG 32
|
|
108 |
#define GSS_C_ANON_FLAG 64
|
|
109 |
#define GSS_C_PROT_READY_FLAG 128
|
|
110 |
#define GSS_C_TRANS_FLAG 256
|
|
111 |
|
|
112 |
/*
|
|
113 |
* Credential usage options
|
|
114 |
*/
|
|
115 |
#define GSS_C_BOTH 0
|
|
116 |
#define GSS_C_INITIATE 1
|
|
117 |
#define GSS_C_ACCEPT 2
|
|
118 |
|
|
119 |
/*
|
|
120 |
* Status code types for gss_display_status
|
|
121 |
*/
|
|
122 |
#define GSS_C_GSS_CODE 1
|
|
123 |
#define GSS_C_MECH_CODE 2
|
|
124 |
|
|
125 |
/*
|
|
126 |
* The constant definitions for channel-bindings address families
|
|
127 |
*/
|
|
128 |
#define GSS_C_AF_UNSPEC 0
|
|
129 |
#define GSS_C_AF_LOCAL 1
|
|
130 |
#define GSS_C_AF_INET 2
|
|
131 |
#define GSS_C_AF_IMPLINK 3
|
|
132 |
#define GSS_C_AF_PUP 4
|
|
133 |
#define GSS_C_AF_CHAOS 5
|
|
134 |
#define GSS_C_AF_NS 6
|
|
135 |
#define GSS_C_AF_NBS 7
|
|
136 |
#define GSS_C_AF_ECMA 8
|
|
137 |
#define GSS_C_AF_DATAKIT 9
|
|
138 |
#define GSS_C_AF_CCITT 10
|
|
139 |
#define GSS_C_AF_SNA 11
|
|
140 |
#define GSS_C_AF_DECnet 12
|
|
141 |
#define GSS_C_AF_DLI 13
|
|
142 |
#define GSS_C_AF_LAT 14
|
|
143 |
#define GSS_C_AF_HYLINK 15
|
|
144 |
#define GSS_C_AF_APPLETALK 16
|
|
145 |
#define GSS_C_AF_BSC 17
|
|
146 |
#define GSS_C_AF_DSS 18
|
|
147 |
#define GSS_C_AF_OSI 19
|
|
148 |
#define GSS_C_AF_X25 21
|
|
149 |
|
|
150 |
#define GSS_C_AF_NULLADDR 255
|
|
151 |
|
|
152 |
/*
|
|
153 |
* Various Null values.
|
|
154 |
*/
|
|
155 |
#define GSS_C_NO_NAME ((gss_name_t) 0)
|
|
156 |
#define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
|
|
157 |
#define GSS_C_NO_OID ((gss_OID) 0)
|
|
158 |
#define GSS_C_NO_OID_SET ((gss_OID_set) 0)
|
|
159 |
#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
|
|
160 |
#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
|
|
161 |
#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
|
|
162 |
#define GSS_C_EMPTY_BUFFER {0, NULL}
|
|
163 |
|
|
164 |
/*
|
|
165 |
* Some alternate names for a couple of the above values. These are defined
|
|
166 |
* for V1 compatibility.
|
|
167 |
*/
|
|
168 |
#define GSS_C_NULL_OID GSS_C_NO_OID
|
|
169 |
#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
|
|
170 |
|
|
171 |
/*
|
|
172 |
* Define the default Quality of Protection for per-message services. Note
|
|
173 |
* that an implementation that offers multiple levels of QOP may either reserve
|
|
174 |
* a value (for example zero, as assumed here) to mean "default protection", or
|
|
175 |
* alternatively may simply equate GSS_C_QOP_DEFAULT to a specific explicit
|
|
176 |
* QOP value. However a value of 0 should always be interpreted by a GSSAPI
|
|
177 |
* implementation as a request for the default protection level.
|
|
178 |
*/
|
|
179 |
#define GSS_C_QOP_DEFAULT 0
|
|
180 |
|
|
181 |
/*
|
|
182 |
* Expiration time of 2^32-1 seconds means infinite lifetime for a
|
|
183 |
* credential or security context
|
|
184 |
*/
|
|
185 |
#define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful)
|
|
186 |
|
|
187 |
|
|
188 |
/* Major status codes */
|
|
189 |
|
|
190 |
#define GSS_S_COMPLETE 0
|
|
191 |
|
|
192 |
/*
|
|
193 |
* Some "helper" definitions to make the status code macros obvious.
|
|
194 |
*/
|
|
195 |
#define GSS_C_CALLING_ERROR_OFFSET 24
|
|
196 |
#define GSS_C_ROUTINE_ERROR_OFFSET 16
|
|
197 |
#define GSS_C_SUPPLEMENTARY_OFFSET 0
|
|
198 |
#define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul)
|
|
199 |
#define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul)
|
|
200 |
#define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul)
|
|
201 |
|
|
202 |
/*
|
|
203 |
* The macros that test status codes for error conditions. Note that the
|
|
204 |
* GSS_ERROR() macro has changed slightly from the V1 GSSAPI so that it now
|
|
205 |
* evaluates its argument only once.
|
|
206 |
*/
|
|
207 |
#define GSS_CALLING_ERROR(x) \
|
|
208 |
((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
|
|
209 |
#define GSS_ROUTINE_ERROR(x) \
|
|
210 |
((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
|
|
211 |
#define GSS_SUPPLEMENTARY_INFO(x) \
|
|
212 |
((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
|
|
213 |
#define GSS_ERROR(x) \
|
|
214 |
((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
|
|
215 |
(GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
|
|
216 |
|
|
217 |
/*
|
|
218 |
* Now the actual status code definitions
|
|
219 |
*/
|
|
220 |
|
|
221 |
/*
|
|
222 |
* Calling errors:
|
|
223 |
*/
|
|
224 |
#define GSS_S_CALL_INACCESSIBLE_READ \
|
|
225 |
(((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET)
|
|
226 |
#define GSS_S_CALL_INACCESSIBLE_WRITE \
|
|
227 |
(((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET)
|
|
228 |
#define GSS_S_CALL_BAD_STRUCTURE \
|
|
229 |
(((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET)
|
|
230 |
|
|
231 |
/*
|
|
232 |
* Routine errors:
|
|
233 |
*/
|
|
234 |
#define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
235 |
#define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
236 |
#define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
237 |
#define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
238 |
#define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
239 |
#define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
240 |
#define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
241 |
#define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
242 |
#define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
243 |
#define GSS_S_DEFECTIVE_CREDENTIAL \
|
|
244 |
(((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
245 |
#define GSS_S_CREDENTIALS_EXPIRED \
|
|
246 |
(((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
247 |
#define GSS_S_CONTEXT_EXPIRED \
|
|
248 |
(((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
249 |
#define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
250 |
#define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
251 |
#define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
252 |
#define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
253 |
#define GSS_S_DUPLICATE_ELEMENT \
|
|
254 |
(((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
255 |
#define GSS_S_NAME_NOT_MN \
|
|
256 |
(((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET)
|
|
257 |
|
|
258 |
/*
|
|
259 |
* Supplementary info bits:
|
|
260 |
*/
|
|
261 |
#define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
|
|
262 |
#define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
|
|
263 |
#define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
|
|
264 |
#define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
|
|
265 |
#define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
|
|
266 |
|
|
267 |
|
|
268 |
/*
|
|
269 |
* Finally, function prototypes for the GSSAPI routines.
|
|
270 |
*/
|
|
271 |
|
|
272 |
#if defined (_WIN32) && defined (_MSC_VER)
|
|
273 |
# ifdef GSS_DLL_FILE
|
|
274 |
# define GSS_DLLIMP __declspec(dllexport)
|
|
275 |
# else
|
|
276 |
# define GSS_DLLIMP __declspec(dllimport)
|
|
277 |
# endif
|
|
278 |
#else
|
|
279 |
# define GSS_DLLIMP
|
|
280 |
#endif
|
|
281 |
|
|
282 |
/* Reserved static storage for GSS_oids. Comments are quotes from RFC 2744.
|
|
283 |
*
|
|
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\x01\x02\x01\x01"},
|
|
287 |
* corresponding to an object-identifier value of
|
|
288 |
* {iso(1) member-body(2) United States(840) mit(113554)
|
|
289 |
* infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
|
|
290 |
* GSS_C_NT_USER_NAME should be initialized to point
|
|
291 |
* to that gss_OID_desc.
|
|
292 |
*/
|
|
293 |
GSS_DLLIMP extern gss_OID GSS_C_NT_USER_NAME;
|
|
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\x01\x02\x01\x02"},
|
|
299 |
* corresponding to an object-identifier value of
|
|
300 |
* {iso(1) member-body(2) United States(840) mit(113554)
|
|
301 |
* infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
|
|
302 |
* The constant GSS_C_NT_MACHINE_UID_NAME should be
|
|
303 |
* initialized to point to that gss_OID_desc.
|
|
304 |
*/
|
|
305 |
GSS_DLLIMP extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
|
|
306 |
|
|
307 |
/*
|
|
308 |
* The implementation must reserve static storage for a
|
|
309 |
* gss_OID_desc object containing the value
|
|
310 |
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"},
|
|
311 |
* corresponding to an object-identifier value of
|
|
312 |
* {iso(1) member-body(2) United States(840) mit(113554)
|
|
313 |
* infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
|
|
314 |
* The constant GSS_C_NT_STRING_UID_NAME should be
|
|
315 |
* initialized to point to that gss_OID_desc.
|
|
316 |
*/
|
|
317 |
GSS_DLLIMP extern gss_OID GSS_C_NT_STRING_UID_NAME;
|
|
318 |
|
|
319 |
/*
|
|
320 |
* The implementation must reserve static storage for a
|
|
321 |
* gss_OID_desc object containing the value
|
|
322 |
* {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
|
|
323 |
* corresponding to an object-identifier value of
|
|
324 |
* {iso(1) org(3) dod(6) internet(1) security(5)
|
|
325 |
* nametypes(6) gss-host-based-services(2)). The constant
|
|
326 |
* GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
|
|
327 |
* to that gss_OID_desc. This is a deprecated OID value, and
|
|
328 |
* implementations wishing to support hostbased-service names
|
|
329 |
* should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
|
|
330 |
* defined below, to identify such names;
|
|
331 |
* GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
|
|
332 |
* for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
|
|
333 |
* parameter, but should not be emitted by GSS-API
|
|
334 |
* implementations
|
|
335 |
*/
|
|
336 |
GSS_DLLIMP extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
|
|
337 |
|
|
338 |
/*
|
|
339 |
* The implementation must reserve static storage for a
|
|
340 |
* gss_OID_desc object containing the value
|
|
341 |
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
|
|
342 |
* "\x01\x02\x01\x04"}, corresponding to an
|
|
343 |
* object-identifier value of {iso(1) member-body(2)
|
|
344 |
* Unites States(840) mit(113554) infosys(1) gssapi(2)
|
|
345 |
* generic(1) service_name(4)}. The constant
|
|
346 |
* GSS_C_NT_HOSTBASED_SERVICE should be initialized
|
|
347 |
* to point to that gss_OID_desc.
|
|
348 |
*/
|
|
349 |
GSS_DLLIMP extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
|
|
350 |
|
|
351 |
/*
|
|
352 |
* The implementation must reserve static storage for a
|
|
353 |
* gss_OID_desc object containing the value
|
|
354 |
* {6, (void *)"\x2b\x06\01\x05\x06\x03"},
|
|
355 |
* corresponding to an object identifier value of
|
|
356 |
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
|
|
357 |
* 6(nametypes), 3(gss-anonymous-name)}. The constant
|
|
358 |
* and GSS_C_NT_ANONYMOUS should be initialized to point
|
|
359 |
* to that gss_OID_desc.
|
|
360 |
*/
|
|
361 |
GSS_DLLIMP extern gss_OID GSS_C_NT_ANONYMOUS;
|
|
362 |
|
|
363 |
|
|
364 |
/*
|
|
365 |
* The implementation must reserve static storage for a
|
|
366 |
* gss_OID_desc object containing the value
|
|
367 |
* {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
|
|
368 |
* corresponding to an object-identifier value of
|
|
369 |
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
|
|
370 |
* 6(nametypes), 4(gss-api-exported-name)}. The constant
|
|
371 |
* GSS_C_NT_EXPORT_NAME should be initialized to point
|
|
372 |
* to that gss_OID_desc.
|
|
373 |
*/
|
|
374 |
GSS_DLLIMP extern gss_OID GSS_C_NT_EXPORT_NAME;
|
|
375 |
|
|
376 |
|
|
377 |
/* Function Prototypes */
|
|
378 |
|
|
379 |
OM_uint32 gss_acquire_cred(
|
|
380 |
OM_uint32 *, /* minor_status */
|
|
381 |
gss_name_t, /* desired_name */
|
|
382 |
OM_uint32, /* time_req */
|
|
383 |
gss_OID_set, /* desired_mechs */
|
|
384 |
gss_cred_usage_t, /* cred_usage */
|
|
385 |
gss_cred_id_t *, /* output_cred_handle */
|
|
386 |
gss_OID_set *, /* actual_mechs */
|
|
387 |
OM_uint32 * /* time_rec */
|
|
388 |
);
|
|
389 |
|
|
390 |
OM_uint32 gss_release_cred(
|
|
391 |
OM_uint32 *, /* minor_status */
|
|
392 |
gss_cred_id_t * /* cred_handle */
|
|
393 |
);
|
|
394 |
|
|
395 |
OM_uint32 gss_init_sec_context(
|
|
396 |
OM_uint32 *, /* minor_status */
|
|
397 |
gss_cred_id_t, /* claimant_cred_handle */
|
|
398 |
gss_ctx_id_t *, /* context_handle */
|
|
399 |
gss_name_t, /* target_name */
|
|
400 |
gss_OID, /* mech_type (used to be const) */
|
|
401 |
OM_uint32, /* req_flags */
|
|
402 |
OM_uint32, /* time_req */
|
|
403 |
gss_channel_bindings_t, /* input_chan_bindings */
|
|
404 |
gss_buffer_t, /* input_token */
|
|
405 |
gss_OID *, /* actual_mech_type */
|
|
406 |
gss_buffer_t, /* output_token */
|
|
407 |
OM_uint32 *, /* ret_flags */
|
|
408 |
OM_uint32 * /* time_rec */
|
|
409 |
);
|
|
410 |
|
|
411 |
OM_uint32 gss_accept_sec_context(
|
|
412 |
OM_uint32 *, /* minor_status */
|
|
413 |
gss_ctx_id_t *, /* context_handle */
|
|
414 |
gss_cred_id_t, /* acceptor_cred_handle */
|
|
415 |
gss_buffer_t, /* input_token_buffer */
|
|
416 |
gss_channel_bindings_t, /* input_chan_bindings */
|
|
417 |
gss_name_t *, /* src_name */
|
|
418 |
gss_OID *, /* mech_type */
|
|
419 |
gss_buffer_t, /* output_token */
|
|
420 |
OM_uint32 *, /* ret_flags */
|
|
421 |
OM_uint32 *, /* time_rec */
|
|
422 |
gss_cred_id_t * /* delegated_cred_handle */
|
|
423 |
);
|
|
424 |
|
|
425 |
OM_uint32 gss_process_context_token(
|
|
426 |
OM_uint32 *, /* minor_status */
|
|
427 |
gss_ctx_id_t, /* context_handle */
|
|
428 |
gss_buffer_t /* token_buffer */
|
|
429 |
);
|
|
430 |
|
|
431 |
OM_uint32 gss_delete_sec_context(
|
|
432 |
OM_uint32 *, /* minor_status */
|
|
433 |
gss_ctx_id_t *, /* context_handle */
|
|
434 |
gss_buffer_t /* output_token */
|
|
435 |
);
|
|
436 |
|
|
437 |
OM_uint32 gss_context_time(
|
|
438 |
OM_uint32 *, /* minor_status */
|
|
439 |
gss_ctx_id_t, /* context_handle */
|
|
440 |
OM_uint32 * /* time_rec */
|
|
441 |
);
|
|
442 |
|
|
443 |
/* New for V2 */
|
|
444 |
OM_uint32 gss_get_mic(
|
|
445 |
OM_uint32 *, /* minor_status */
|
|
446 |
gss_ctx_id_t, /* context_handle */
|
|
447 |
gss_qop_t, /* qop_req */
|
|
448 |
gss_buffer_t, /* message_buffer */
|
|
449 |
gss_buffer_t /* message_token */
|
|
450 |
);
|
|
451 |
|
|
452 |
/* New for V2 */
|
|
453 |
OM_uint32 gss_verify_mic(
|
|
454 |
OM_uint32 *, /* minor_status */
|
|
455 |
gss_ctx_id_t, /* context_handle */
|
|
456 |
gss_buffer_t, /* message_buffer */
|
|
457 |
gss_buffer_t, /* message_token */
|
|
458 |
gss_qop_t * /* qop_state */
|
|
459 |
);
|
|
460 |
|
|
461 |
/* New for V2 */
|
|
462 |
OM_uint32 gss_wrap(
|
|
463 |
OM_uint32 *, /* minor_status */
|
|
464 |
gss_ctx_id_t, /* context_handle */
|
|
465 |
int, /* conf_req_flag */
|
|
466 |
gss_qop_t, /* qop_req */
|
|
467 |
gss_buffer_t, /* input_message_buffer */
|
|
468 |
int *, /* conf_state */
|
|
469 |
gss_buffer_t /* output_message_buffer */
|
|
470 |
);
|
|
471 |
|
|
472 |
/* New for V2 */
|
|
473 |
OM_uint32 gss_unwrap(
|
|
474 |
OM_uint32 *, /* minor_status */
|
|
475 |
gss_ctx_id_t, /* context_handle */
|
|
476 |
gss_buffer_t, /* input_message_buffer */
|
|
477 |
gss_buffer_t, /* output_message_buffer */
|
|
478 |
int *, /* conf_state */
|
|
479 |
gss_qop_t * /* qop_state */
|
|
480 |
);
|
|
481 |
|
|
482 |
OM_uint32 gss_display_status(
|
|
483 |
OM_uint32 *, /* minor_status */
|
|
484 |
OM_uint32, /* status_value */
|
|
485 |
int, /* status_type */
|
|
486 |
gss_OID, /* mech_type (used to be const) */
|
|
487 |
OM_uint32 *, /* message_context */
|
|
488 |
gss_buffer_t /* status_string */
|
|
489 |
);
|
|
490 |
|
|
491 |
OM_uint32 gss_indicate_mechs(
|
|
492 |
OM_uint32 *, /* minor_status */
|
|
493 |
gss_OID_set * /* mech_set */
|
|
494 |
);
|
|
495 |
|
|
496 |
OM_uint32 gss_compare_name(
|
|
497 |
OM_uint32 *, /* minor_status */
|
|
498 |
gss_name_t, /* name1 */
|
|
499 |
gss_name_t, /* name2 */
|
|
500 |
int * /* name_equal */
|
|
501 |
);
|
|
502 |
|
|
503 |
OM_uint32 gss_display_name(
|
|
504 |
OM_uint32 *, /* minor_status */
|
|
505 |
gss_name_t, /* input_name */
|
|
506 |
gss_buffer_t, /* output_name_buffer */
|
|
507 |
gss_OID * /* output_name_type */
|
|
508 |
);
|
|
509 |
|
|
510 |
OM_uint32 gss_import_name(
|
|
511 |
OM_uint32 *, /* minor_status */
|
|
512 |
gss_buffer_t, /* input_name_buffer */
|
|
513 |
gss_OID, /* input_name_type(used to be const) */
|
|
514 |
gss_name_t * /* output_name */
|
|
515 |
);
|
|
516 |
|
|
517 |
OM_uint32 gss_release_name(
|
|
518 |
OM_uint32 *, /* minor_status */
|
|
519 |
gss_name_t * /* input_name */
|
|
520 |
);
|
|
521 |
|
|
522 |
OM_uint32 gss_release_buffer(
|
|
523 |
OM_uint32 *, /* minor_status */
|
|
524 |
gss_buffer_t /* buffer */
|
|
525 |
);
|
|
526 |
|
|
527 |
OM_uint32 gss_release_oid_set(
|
|
528 |
OM_uint32 *, /* minor_status */
|
|
529 |
gss_OID_set * /* set */
|
|
530 |
);
|
|
531 |
|
|
532 |
OM_uint32 gss_inquire_cred(
|
|
533 |
OM_uint32 *, /* minor_status */
|
|
534 |
gss_cred_id_t, /* cred_handle */
|
|
535 |
gss_name_t *, /* name */
|
|
536 |
OM_uint32 *, /* lifetime */
|
|
537 |
gss_cred_usage_t *, /* cred_usage */
|
|
538 |
gss_OID_set * /* mechanisms */
|
|
539 |
);
|
|
540 |
|
|
541 |
/* Last argument new for V2 */
|
|
542 |
OM_uint32 gss_inquire_context(
|
|
543 |
OM_uint32 *, /* minor_status */
|
|
544 |
gss_ctx_id_t, /* context_handle */
|
|
545 |
gss_name_t *, /* src_name */
|
|
546 |
gss_name_t *, /* targ_name */
|
|
547 |
OM_uint32 *, /* lifetime_rec */
|
|
548 |
gss_OID *, /* mech_type */
|
|
549 |
OM_uint32 *, /* ctx_flags */
|
|
550 |
int *, /* locally_initiated */
|
|
551 |
int * /* open */
|
|
552 |
);
|
|
553 |
|
|
554 |
/* New for V2 */
|
|
555 |
OM_uint32 gss_wrap_size_limit(
|
|
556 |
OM_uint32 *, /* minor_status */
|
|
557 |
gss_ctx_id_t, /* context_handle */
|
|
558 |
int, /* conf_req_flag */
|
|
559 |
gss_qop_t, /* qop_req */
|
|
560 |
OM_uint32, /* req_output_size */
|
|
561 |
OM_uint32 * /* max_input_size */
|
|
562 |
);
|
|
563 |
|
|
564 |
/* New for V2 */
|
|
565 |
OM_uint32 gss_add_cred(
|
|
566 |
OM_uint32 *, /* minor_status */
|
|
567 |
gss_cred_id_t, /* input_cred_handle */
|
|
568 |
gss_name_t, /* desired_name */
|
|
569 |
gss_OID, /* desired_mech */
|
|
570 |
gss_cred_usage_t, /* cred_usage */
|
|
571 |
OM_uint32, /* initiator_time_req */
|
|
572 |
OM_uint32, /* acceptor_time_req */
|
|
573 |
gss_cred_id_t *, /* output_cred_handle */
|
|
574 |
gss_OID_set *, /* actual_mechs */
|
|
575 |
OM_uint32 *, /* initiator_time_rec */
|
|
576 |
OM_uint32 * /* acceptor_time_rec */
|
|
577 |
);
|
|
578 |
|
|
579 |
/* New for V2 */
|
|
580 |
OM_uint32 gss_inquire_cred_by_mech(
|
|
581 |
OM_uint32 *, /* minor_status */
|
|
582 |
gss_cred_id_t, /* cred_handle */
|
|
583 |
gss_OID, /* mech_type */
|
|
584 |
gss_name_t *, /* name */
|
|
585 |
OM_uint32 *, /* initiator_lifetime */
|
|
586 |
OM_uint32 *, /* acceptor_lifetime */
|
|
587 |
gss_cred_usage_t * /* cred_usage */
|
|
588 |
);
|
|
589 |
|
|
590 |
/* New for V2 */
|
|
591 |
OM_uint32 gss_export_sec_context(
|
|
592 |
OM_uint32 *, /* minor_status */
|
|
593 |
gss_ctx_id_t *, /* context_handle */
|
|
594 |
gss_buffer_t /* interprocess_token */
|
|
595 |
);
|
|
596 |
|
|
597 |
/* New for V2 */
|
|
598 |
OM_uint32 gss_import_sec_context(
|
|
599 |
OM_uint32 *, /* minor_status */
|
|
600 |
gss_buffer_t, /* interprocess_token */
|
|
601 |
gss_ctx_id_t * /* context_handle */
|
|
602 |
);
|
|
603 |
|
|
604 |
/* New for V2 */
|
|
605 |
OM_uint32 gss_release_oid(
|
|
606 |
OM_uint32 *, /* minor_status */
|
|
607 |
gss_OID * /* oid */
|
|
608 |
);
|
|
609 |
|
|
610 |
/* New for V2 */
|
|
611 |
OM_uint32 gss_create_empty_oid_set(
|
|
612 |
OM_uint32 *, /* minor_status */
|
|
613 |
gss_OID_set * /* oid_set */
|
|
614 |
);
|
|
615 |
|
|
616 |
/* New for V2 */
|
|
617 |
OM_uint32 gss_add_oid_set_member(
|
|
618 |
OM_uint32 *, /* minor_status */
|
|
619 |
gss_OID, /* member_oid */
|
|
620 |
gss_OID_set * /* oid_set */
|
|
621 |
);
|
|
622 |
|
|
623 |
/* New for V2 */
|
|
624 |
OM_uint32 gss_test_oid_set_member(
|
|
625 |
OM_uint32 *, /* minor_status */
|
|
626 |
gss_OID, /* member */
|
|
627 |
gss_OID_set, /* set */
|
|
628 |
int * /* present */
|
|
629 |
);
|
|
630 |
|
|
631 |
/* New for V2 */
|
|
632 |
OM_uint32 gss_str_to_oid(
|
|
633 |
OM_uint32 *, /* minor_status */
|
|
634 |
gss_buffer_t, /* oid_str */
|
|
635 |
gss_OID * /* oid */
|
|
636 |
);
|
|
637 |
|
|
638 |
/* New for V2 */
|
|
639 |
OM_uint32 gss_oid_to_str(
|
|
640 |
OM_uint32 *, /* minor_status */
|
|
641 |
gss_OID, /* oid */
|
|
642 |
gss_buffer_t /* oid_str */
|
|
643 |
);
|
|
644 |
|
|
645 |
/* New for V2 */
|
|
646 |
OM_uint32 gss_inquire_names_for_mech(
|
|
647 |
OM_uint32 *, /* minor_status */
|
|
648 |
gss_OID, /* mechanism */
|
|
649 |
gss_OID_set * /* name_types */
|
|
650 |
);
|
|
651 |
|
|
652 |
/* New for V2 */
|
|
653 |
OM_uint32 gss_export_name(
|
|
654 |
OM_uint32 *, /* minor_status */
|
|
655 |
const gss_name_t, /* input_name */
|
|
656 |
gss_buffer_t /* exported_name */
|
|
657 |
);
|
|
658 |
|
|
659 |
/* New for V2 */
|
|
660 |
OM_uint32 gss_duplicate_name(
|
|
661 |
OM_uint32 *, /* minor_status */
|
|
662 |
const gss_name_t, /* input_name */
|
|
663 |
gss_name_t * /* dest_name */
|
|
664 |
);
|
|
665 |
|
|
666 |
/* New for V2 */
|
|
667 |
OM_uint32 gss_canonicalize_name(
|
|
668 |
OM_uint32 *, /* minor_status */
|
|
669 |
const gss_name_t, /* input_name */
|
|
670 |
const gss_OID, /* mech_type */
|
|
671 |
gss_name_t * /* output_name */
|
|
672 |
);
|
|
673 |
|
|
674 |
#ifdef __cplusplus
|
|
675 |
}
|
|
676 |
#endif
|
|
677 |
|
|
678 |
#endif /* _GSSAPI_H_ */
|