r19681: Update to current lorikeet-heimdal. I'm looking at using the realm
[Samba.git] / source / heimdal / lib / gssapi / gssapi / gssapi.h
blobf89e5dfbeed4260cd581287ac425d1a7b3083e3b
1 /*
2 * Copyright (c) 1997 - 2006 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 /* $Id: gssapi.h,v 1.6 2006/11/10 00:39:50 lha Exp $ */
36 #ifndef GSSAPI_GSSAPI_H_
37 #define GSSAPI_GSSAPI_H_
40 * First, include stddef.h to get size_t defined.
42 #include <stddef.h>
44 #include <krb5-types.h>
47 * Now define the three implementation-dependent types.
50 typedef uint32_t OM_uint32;
51 typedef uint64_t OM_uint64;
53 typedef uint32_t gss_uint32;
55 struct gss_name_t_desc_struct;
56 typedef struct gss_name_t_desc_struct *gss_name_t;
58 struct gss_ctx_id_t_desc_struct;
59 typedef struct gss_ctx_id_t_desc_struct *gss_ctx_id_t;
61 typedef struct gss_OID_desc_struct {
62 OM_uint32 length;
63 void *elements;
64 } gss_OID_desc, *gss_OID;
66 typedef struct gss_OID_set_desc_struct {
67 size_t count;
68 gss_OID elements;
69 } gss_OID_set_desc, *gss_OID_set;
71 typedef int gss_cred_usage_t;
73 struct gss_cred_id_t_desc_struct;
74 typedef struct gss_cred_id_t_desc_struct *gss_cred_id_t;
76 typedef struct gss_buffer_desc_struct {
77 size_t length;
78 void *value;
79 } gss_buffer_desc, *gss_buffer_t;
81 typedef struct gss_channel_bindings_struct {
82 OM_uint32 initiator_addrtype;
83 gss_buffer_desc initiator_address;
84 OM_uint32 acceptor_addrtype;
85 gss_buffer_desc acceptor_address;
86 gss_buffer_desc application_data;
87 } *gss_channel_bindings_t;
89 /* GGF extension data types */
90 typedef struct gss_buffer_set_desc_struct {
91 size_t count;
92 gss_buffer_desc *elements;
93 } gss_buffer_set_desc, *gss_buffer_set_t;
96 * For now, define a QOP-type as an OM_uint32
98 typedef OM_uint32 gss_qop_t;
101 * Flag bits for context-level services.
103 #define GSS_C_DELEG_FLAG 1
104 #define GSS_C_MUTUAL_FLAG 2
105 #define GSS_C_REPLAY_FLAG 4
106 #define GSS_C_SEQUENCE_FLAG 8
107 #define GSS_C_CONF_FLAG 16
108 #define GSS_C_INTEG_FLAG 32
109 #define GSS_C_ANON_FLAG 64
110 #define GSS_C_PROT_READY_FLAG 128
111 #define GSS_C_TRANS_FLAG 256
113 #define GSS_C_DCE_STYLE 4096
114 #define GSS_C_IDENTIFY_FLAG 8192
115 #define GSS_C_EXTENDED_ERROR_FLAG 16384
118 * Credential usage options
120 #define GSS_C_BOTH 0
121 #define GSS_C_INITIATE 1
122 #define GSS_C_ACCEPT 2
125 * Status code types for gss_display_status
127 #define GSS_C_GSS_CODE 1
128 #define GSS_C_MECH_CODE 2
131 * The constant definitions for channel-bindings address families
133 #define GSS_C_AF_UNSPEC 0
134 #define GSS_C_AF_LOCAL 1
135 #define GSS_C_AF_INET 2
136 #define GSS_C_AF_IMPLINK 3
137 #define GSS_C_AF_PUP 4
138 #define GSS_C_AF_CHAOS 5
139 #define GSS_C_AF_NS 6
140 #define GSS_C_AF_NBS 7
141 #define GSS_C_AF_ECMA 8
142 #define GSS_C_AF_DATAKIT 9
143 #define GSS_C_AF_CCITT 10
144 #define GSS_C_AF_SNA 11
145 #define GSS_C_AF_DECnet 12
146 #define GSS_C_AF_DLI 13
147 #define GSS_C_AF_LAT 14
148 #define GSS_C_AF_HYLINK 15
149 #define GSS_C_AF_APPLETALK 16
150 #define GSS_C_AF_BSC 17
151 #define GSS_C_AF_DSS 18
152 #define GSS_C_AF_OSI 19
153 #define GSS_C_AF_X25 21
154 #define GSS_C_AF_INET6 24
156 #define GSS_C_AF_NULLADDR 255
159 * Various Null values
161 #define GSS_C_NO_NAME ((gss_name_t) 0)
162 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
163 #define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t) 0)
164 #define GSS_C_NO_OID ((gss_OID) 0)
165 #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
166 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
167 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
168 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
169 #define GSS_C_EMPTY_BUFFER {0, NULL}
172 * Some alternate names for a couple of the above
173 * values. These are defined for V1 compatibility.
175 #define GSS_C_NULL_OID GSS_C_NO_OID
176 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
179 * Define the default Quality of Protection for per-message
180 * services. Note that an implementation that offers multiple
181 * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
182 * (as done here) to mean "default protection", or to a specific
183 * explicit QOP value. However, a value of 0 should always be
184 * interpreted by a GSSAPI implementation as a request for the
185 * default protection level.
187 #define GSS_C_QOP_DEFAULT 0
189 #define GSS_KRB5_CONF_C_QOP_DES 0x0100
190 #define GSS_KRB5_CONF_C_QOP_DES3_KD 0x0200
193 * Expiration time of 2^32-1 seconds means infinite lifetime for a
194 * credential or security context
196 #define GSS_C_INDEFINITE 0xfffffffful
198 #ifdef __cplusplus
199 extern "C" {
200 #endif
203 * The implementation must reserve static storage for a
204 * gss_OID_desc object containing the value
205 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
206 * "\x01\x02\x01\x01"},
207 * corresponding to an object-identifier value of
208 * {iso(1) member-body(2) United States(840) mit(113554)
209 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
210 * GSS_C_NT_USER_NAME should be initialized to point
211 * to that gss_OID_desc.
213 extern gss_OID GSS_C_NT_USER_NAME;
216 * The implementation must reserve static storage for a
217 * gss_OID_desc object containing the value
218 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
219 * "\x01\x02\x01\x02"},
220 * corresponding to an object-identifier value of
221 * {iso(1) member-body(2) United States(840) mit(113554)
222 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
223 * The constant GSS_C_NT_MACHINE_UID_NAME should be
224 * initialized to point to that gss_OID_desc.
226 extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
229 * The implementation must reserve static storage for a
230 * gss_OID_desc object containing the value
231 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
232 * "\x01\x02\x01\x03"},
233 * corresponding to an object-identifier value of
234 * {iso(1) member-body(2) United States(840) mit(113554)
235 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
236 * The constant GSS_C_NT_STRING_UID_NAME should be
237 * initialized to point to that gss_OID_desc.
239 extern gss_OID GSS_C_NT_STRING_UID_NAME;
242 * The implementation must reserve static storage for a
243 * gss_OID_desc object containing the value
244 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
245 * corresponding to an object-identifier value of
246 * {iso(1) org(3) dod(6) internet(1) security(5)
247 * nametypes(6) gss-host-based-services(2)). The constant
248 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
249 * to that gss_OID_desc. This is a deprecated OID value, and
250 * implementations wishing to support hostbased-service names
251 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
252 * defined below, to identify such names;
253 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
254 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
255 * parameter, but should not be emitted by GSS-API
256 * implementations
258 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
261 * The implementation must reserve static storage for a
262 * gss_OID_desc object containing the value
263 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
264 * "\x01\x02\x01\x04"}, corresponding to an
265 * object-identifier value of {iso(1) member-body(2)
266 * Unites States(840) mit(113554) infosys(1) gssapi(2)
267 * generic(1) service_name(4)}. The constant
268 * GSS_C_NT_HOSTBASED_SERVICE should be initialized
269 * to point to that gss_OID_desc.
271 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
274 * The implementation must reserve static storage for a
275 * gss_OID_desc object containing the value
276 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
277 * corresponding to an object identifier value of
278 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
279 * 6(nametypes), 3(gss-anonymous-name)}. The constant
280 * and GSS_C_NT_ANONYMOUS should be initialized to point
281 * to that gss_OID_desc.
283 extern gss_OID GSS_C_NT_ANONYMOUS;
286 * The implementation must reserve static storage for a
287 * gss_OID_desc object containing the value
288 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
289 * corresponding to an object-identifier value of
290 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
291 * 6(nametypes), 4(gss-api-exported-name)}. The constant
292 * GSS_C_NT_EXPORT_NAME should be initialized to point
293 * to that gss_OID_desc.
295 extern gss_OID GSS_C_NT_EXPORT_NAME;
298 * Digest mechanism
301 extern gss_OID GSS_SASL_DIGEST_MD5_MECHANISM;
303 /* Major status codes */
305 #define GSS_S_COMPLETE 0
308 * Some "helper" definitions to make the status code macros obvious.
310 #define GSS_C_CALLING_ERROR_OFFSET 24
311 #define GSS_C_ROUTINE_ERROR_OFFSET 16
312 #define GSS_C_SUPPLEMENTARY_OFFSET 0
313 #define GSS_C_CALLING_ERROR_MASK 0377ul
314 #define GSS_C_ROUTINE_ERROR_MASK 0377ul
315 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul
318 * The macros that test status codes for error conditions.
319 * Note that the GSS_ERROR() macro has changed slightly from
320 * the V1 GSSAPI so that it now evaluates its argument
321 * only once.
323 #define GSS_CALLING_ERROR(x) \
324 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
325 #define GSS_ROUTINE_ERROR(x) \
326 (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
327 #define GSS_SUPPLEMENTARY_INFO(x) \
328 (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
329 #define GSS_ERROR(x) \
330 (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
331 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
334 * Now the actual status code definitions
338 * Calling errors:
340 #define GSS_S_CALL_INACCESSIBLE_READ \
341 (1ul << GSS_C_CALLING_ERROR_OFFSET)
342 #define GSS_S_CALL_INACCESSIBLE_WRITE \
343 (2ul << GSS_C_CALLING_ERROR_OFFSET)
344 #define GSS_S_CALL_BAD_STRUCTURE \
345 (3ul << GSS_C_CALLING_ERROR_OFFSET)
348 * Routine errors:
350 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
351 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
352 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
354 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
355 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
356 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
357 #define GSS_S_BAD_MIC GSS_S_BAD_SIG
358 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
359 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
360 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
361 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
362 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
363 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
364 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
365 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
366 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
367 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
368 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
369 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
372 * Supplementary info bits:
374 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
375 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
376 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
377 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
378 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
381 * Finally, function prototypes for the GSS-API routines.
384 OM_uint32 gss_acquire_cred
385 (OM_uint32 * /*minor_status*/,
386 const gss_name_t /*desired_name*/,
387 OM_uint32 /*time_req*/,
388 const gss_OID_set /*desired_mechs*/,
389 gss_cred_usage_t /*cred_usage*/,
390 gss_cred_id_t * /*output_cred_handle*/,
391 gss_OID_set * /*actual_mechs*/,
392 OM_uint32 * /*time_rec*/
395 OM_uint32 gss_release_cred
396 (OM_uint32 * /*minor_status*/,
397 gss_cred_id_t * /*cred_handle*/
400 OM_uint32 gss_init_sec_context
401 (OM_uint32 * /*minor_status*/,
402 const gss_cred_id_t /*initiator_cred_handle*/,
403 gss_ctx_id_t * /*context_handle*/,
404 const gss_name_t /*target_name*/,
405 const gss_OID /*mech_type*/,
406 OM_uint32 /*req_flags*/,
407 OM_uint32 /*time_req*/,
408 const gss_channel_bindings_t /*input_chan_bindings*/,
409 const gss_buffer_t /*input_token*/,
410 gss_OID * /*actual_mech_type*/,
411 gss_buffer_t /*output_token*/,
412 OM_uint32 * /*ret_flags*/,
413 OM_uint32 * /*time_rec*/
416 OM_uint32 gss_accept_sec_context
417 (OM_uint32 * /*minor_status*/,
418 gss_ctx_id_t * /*context_handle*/,
419 const gss_cred_id_t /*acceptor_cred_handle*/,
420 const gss_buffer_t /*input_token_buffer*/,
421 const gss_channel_bindings_t /*input_chan_bindings*/,
422 gss_name_t * /*src_name*/,
423 gss_OID * /*mech_type*/,
424 gss_buffer_t /*output_token*/,
425 OM_uint32 * /*ret_flags*/,
426 OM_uint32 * /*time_rec*/,
427 gss_cred_id_t * /*delegated_cred_handle*/
430 OM_uint32 gss_process_context_token
431 (OM_uint32 * /*minor_status*/,
432 const gss_ctx_id_t /*context_handle*/,
433 const gss_buffer_t /*token_buffer*/
436 OM_uint32 gss_delete_sec_context
437 (OM_uint32 * /*minor_status*/,
438 gss_ctx_id_t * /*context_handle*/,
439 gss_buffer_t /*output_token*/
442 OM_uint32 gss_context_time
443 (OM_uint32 * /*minor_status*/,
444 const gss_ctx_id_t /*context_handle*/,
445 OM_uint32 * /*time_rec*/
448 OM_uint32 gss_get_mic
449 (OM_uint32 * /*minor_status*/,
450 const gss_ctx_id_t /*context_handle*/,
451 gss_qop_t /*qop_req*/,
452 const gss_buffer_t /*message_buffer*/,
453 gss_buffer_t /*message_token*/
456 OM_uint32 gss_verify_mic
457 (OM_uint32 * /*minor_status*/,
458 const gss_ctx_id_t /*context_handle*/,
459 const gss_buffer_t /*message_buffer*/,
460 const gss_buffer_t /*token_buffer*/,
461 gss_qop_t * /*qop_state*/
464 OM_uint32 gss_wrap
465 (OM_uint32 * /*minor_status*/,
466 const gss_ctx_id_t /*context_handle*/,
467 int /*conf_req_flag*/,
468 gss_qop_t /*qop_req*/,
469 const gss_buffer_t /*input_message_buffer*/,
470 int * /*conf_state*/,
471 gss_buffer_t /*output_message_buffer*/
474 OM_uint32 gss_unwrap
475 (OM_uint32 * /*minor_status*/,
476 const gss_ctx_id_t /*context_handle*/,
477 const gss_buffer_t /*input_message_buffer*/,
478 gss_buffer_t /*output_message_buffer*/,
479 int * /*conf_state*/,
480 gss_qop_t * /*qop_state*/
483 OM_uint32 gss_display_status
484 (OM_uint32 * /*minor_status*/,
485 OM_uint32 /*status_value*/,
486 int /*status_type*/,
487 const gss_OID /*mech_type*/,
488 OM_uint32 * /*message_context*/,
489 gss_buffer_t /*status_string*/
492 OM_uint32 gss_indicate_mechs
493 (OM_uint32 * /*minor_status*/,
494 gss_OID_set * /*mech_set*/
497 OM_uint32 gss_compare_name
498 (OM_uint32 * /*minor_status*/,
499 const gss_name_t /*name1*/,
500 const gss_name_t /*name2*/,
501 int * /*name_equal*/
504 OM_uint32 gss_display_name
505 (OM_uint32 * /*minor_status*/,
506 const gss_name_t /*input_name*/,
507 gss_buffer_t /*output_name_buffer*/,
508 gss_OID * /*output_name_type*/
511 OM_uint32 gss_import_name
512 (OM_uint32 * /*minor_status*/,
513 const gss_buffer_t /*input_name_buffer*/,
514 const gss_OID /*input_name_type*/,
515 gss_name_t * /*output_name*/
518 OM_uint32 gss_export_name
519 (OM_uint32 * /*minor_status*/,
520 const gss_name_t /*input_name*/,
521 gss_buffer_t /*exported_name*/
524 OM_uint32 gss_release_name
525 (OM_uint32 * /*minor_status*/,
526 gss_name_t * /*input_name*/
529 OM_uint32 gss_release_buffer
530 (OM_uint32 * /*minor_status*/,
531 gss_buffer_t /*buffer*/
534 OM_uint32 gss_release_oid_set
535 (OM_uint32 * /*minor_status*/,
536 gss_OID_set * /*set*/
539 OM_uint32 gss_inquire_cred
540 (OM_uint32 * /*minor_status*/,
541 const gss_cred_id_t /*cred_handle*/,
542 gss_name_t * /*name*/,
543 OM_uint32 * /*lifetime*/,
544 gss_cred_usage_t * /*cred_usage*/,
545 gss_OID_set * /*mechanisms*/
548 OM_uint32 gss_inquire_context (
549 OM_uint32 * /*minor_status*/,
550 const gss_ctx_id_t /*context_handle*/,
551 gss_name_t * /*src_name*/,
552 gss_name_t * /*targ_name*/,
553 OM_uint32 * /*lifetime_rec*/,
554 gss_OID * /*mech_type*/,
555 OM_uint32 * /*ctx_flags*/,
556 int * /*locally_initiated*/,
557 int * /*open_context*/
560 OM_uint32 gss_wrap_size_limit (
561 OM_uint32 * /*minor_status*/,
562 const gss_ctx_id_t /*context_handle*/,
563 int /*conf_req_flag*/,
564 gss_qop_t /*qop_req*/,
565 OM_uint32 /*req_output_size*/,
566 OM_uint32 * /*max_input_size*/
569 OM_uint32 gss_add_cred (
570 OM_uint32 * /*minor_status*/,
571 const gss_cred_id_t /*input_cred_handle*/,
572 const gss_name_t /*desired_name*/,
573 const gss_OID /*desired_mech*/,
574 gss_cred_usage_t /*cred_usage*/,
575 OM_uint32 /*initiator_time_req*/,
576 OM_uint32 /*acceptor_time_req*/,
577 gss_cred_id_t * /*output_cred_handle*/,
578 gss_OID_set * /*actual_mechs*/,
579 OM_uint32 * /*initiator_time_rec*/,
580 OM_uint32 * /*acceptor_time_rec*/
583 OM_uint32 gss_inquire_cred_by_mech (
584 OM_uint32 * /*minor_status*/,
585 const gss_cred_id_t /*cred_handle*/,
586 const gss_OID /*mech_type*/,
587 gss_name_t * /*name*/,
588 OM_uint32 * /*initiator_lifetime*/,
589 OM_uint32 * /*acceptor_lifetime*/,
590 gss_cred_usage_t * /*cred_usage*/
593 OM_uint32 gss_export_sec_context (
594 OM_uint32 * /*minor_status*/,
595 gss_ctx_id_t * /*context_handle*/,
596 gss_buffer_t /*interprocess_token*/
599 OM_uint32 gss_import_sec_context (
600 OM_uint32 * /*minor_status*/,
601 const gss_buffer_t /*interprocess_token*/,
602 gss_ctx_id_t * /*context_handle*/
605 OM_uint32 gss_create_empty_oid_set (
606 OM_uint32 * /*minor_status*/,
607 gss_OID_set * /*oid_set*/
610 OM_uint32 gss_add_oid_set_member (
611 OM_uint32 * /*minor_status*/,
612 const gss_OID /*member_oid*/,
613 gss_OID_set * /*oid_set*/
616 OM_uint32 gss_test_oid_set_member (
617 OM_uint32 * /*minor_status*/,
618 const gss_OID /*member*/,
619 const gss_OID_set /*set*/,
620 int * /*present*/
623 OM_uint32 gss_inquire_names_for_mech (
624 OM_uint32 * /*minor_status*/,
625 const gss_OID /*mechanism*/,
626 gss_OID_set * /*name_types*/
629 OM_uint32 gss_inquire_mechs_for_name (
630 OM_uint32 * /*minor_status*/,
631 const gss_name_t /*input_name*/,
632 gss_OID_set * /*mech_types*/
635 OM_uint32 gss_canonicalize_name (
636 OM_uint32 * /*minor_status*/,
637 const gss_name_t /*input_name*/,
638 const gss_OID /*mech_type*/,
639 gss_name_t * /*output_name*/
642 OM_uint32 gss_duplicate_name (
643 OM_uint32 * /*minor_status*/,
644 const gss_name_t /*src_name*/,
645 gss_name_t * /*dest_name*/
648 OM_uint32 gss_duplicate_oid (
649 OM_uint32 * /* minor_status */,
650 gss_OID /* src_oid */,
651 gss_OID * /* dest_oid */
653 OM_uint32
654 gss_release_oid
655 (OM_uint32 * /*minor_status*/,
656 gss_OID * /* oid */
659 OM_uint32
660 gss_oid_to_str(
661 OM_uint32 * /*minor_status*/,
662 gss_OID /* oid */,
663 gss_buffer_t /* str */
666 OM_uint32
667 gss_inquire_sec_context_by_oid(
668 OM_uint32 * minor_status,
669 const gss_ctx_id_t context_handle,
670 const gss_OID desired_object,
671 gss_buffer_set_t *data_set
674 OM_uint32
675 gss_set_sec_context_option (OM_uint32 *minor_status,
676 gss_ctx_id_t *context_handle,
677 const gss_OID desired_object,
678 const gss_buffer_t value);
680 OM_uint32
681 gss_set_cred_option (OM_uint32 *minor_status,
682 gss_cred_id_t *cred_handle,
683 const gss_OID object,
684 const gss_buffer_t value);
687 gss_oid_equal(const gss_OID a, const gss_OID b);
689 OM_uint32
690 gss_create_empty_buffer_set
691 (OM_uint32 * minor_status,
692 gss_buffer_set_t *buffer_set);
694 OM_uint32
695 gss_add_buffer_set_member
696 (OM_uint32 * minor_status,
697 const gss_buffer_t member_buffer,
698 gss_buffer_set_t *buffer_set);
700 OM_uint32
701 gss_release_buffer_set
702 (OM_uint32 * minor_status,
703 gss_buffer_set_t *buffer_set);
705 OM_uint32
706 gss_inquire_cred_by_oid(OM_uint32 *minor_status,
707 const gss_cred_id_t cred_handle,
708 const gss_OID desired_object,
709 gss_buffer_set_t *data_set);
712 * The following routines are obsolete variants of gss_get_mic,
713 * gss_verify_mic, gss_wrap and gss_unwrap. They should be
714 * provided by GSSAPI V2 implementations for backwards
715 * compatibility with V1 applications. Distinct entrypoints
716 * (as opposed to #defines) should be provided, both to allow
717 * GSSAPI V1 applications to link against GSSAPI V2 implementations,
718 * and to retain the slight parameter type differences between the
719 * obsolete versions of these routines and their current forms.
722 OM_uint32 gss_sign
723 (OM_uint32 * /*minor_status*/,
724 gss_ctx_id_t /*context_handle*/,
725 int /*qop_req*/,
726 gss_buffer_t /*message_buffer*/,
727 gss_buffer_t /*message_token*/
730 OM_uint32 gss_verify
731 (OM_uint32 * /*minor_status*/,
732 gss_ctx_id_t /*context_handle*/,
733 gss_buffer_t /*message_buffer*/,
734 gss_buffer_t /*token_buffer*/,
735 int * /*qop_state*/
738 OM_uint32 gss_seal
739 (OM_uint32 * /*minor_status*/,
740 gss_ctx_id_t /*context_handle*/,
741 int /*conf_req_flag*/,
742 int /*qop_req*/,
743 gss_buffer_t /*input_message_buffer*/,
744 int * /*conf_state*/,
745 gss_buffer_t /*output_message_buffer*/
748 OM_uint32 gss_unseal
749 (OM_uint32 * /*minor_status*/,
750 gss_ctx_id_t /*context_handle*/,
751 gss_buffer_t /*input_message_buffer*/,
752 gss_buffer_t /*output_message_buffer*/,
753 int * /*conf_state*/,
754 int * /*qop_state*/
761 OM_uint32
762 gss_inquire_sec_context_by_oid (OM_uint32 *minor_status,
763 const gss_ctx_id_t context_handle,
764 const gss_OID desired_object,
765 gss_buffer_set_t *data_set);
767 OM_uint32
768 gss_encapsulate_token(gss_buffer_t /* input_token */,
769 gss_OID /* oid */,
770 gss_buffer_t /* output_token */);
772 OM_uint32
773 gss_decapsulate_token(gss_buffer_t /* input_token */,
774 gss_OID /* oid */,
775 gss_buffer_t /* output_token */);
779 #ifdef __cplusplus
781 #endif
783 #include <gssapi/gssapi_krb5.h>
784 #include <gssapi/gssapi_spnego.h>
786 #endif /* GSSAPI_GSSAPI_H_ */