1 /* This is the gssapi.h prologue. */
2 /* It contains some choice pieces of autoconf.h */
6 #define HAVE_STDARG_H 1
7 /* #undef HAVE_VARARGS_H */
8 /* #undef HAVE_MACSOCK_H */
9 #define HAVE_NETINET_IN_H 1
10 #define HAVE_STDDEF_H 1
11 #define HAVE_STDLIB_H 1
12 #define HAVE_STRING_H 1
13 #define HAVE_SYS_FILE_H 1
14 #define HAVE_SYS_PARAM_H 1
15 #define HAVE_SYS_SOCKET_H 1
16 #define HAVE_SYS_STAT_H 1
17 #define HAVE_SYS_TIME_H 1
18 #define HAVE_SYS_TYPES_H 1
19 #define HAVE_UNISTD_H 1
20 /* #undef HAVE_XOM_H */
21 #define USE_DIRENT_H 1
22 /* End of gssapi.h prologue. */
24 * Copyright 1993 by OpenVision Technologies, Inc.
26 * Permission to use, copy, modify, distribute, and sell this software
27 * and its documentation for any purpose is hereby granted without fee,
28 * provided that the above copyright notice appears in all copies and
29 * that both that copyright notice and this permission notice appear in
30 * supporting documentation, and that the name of OpenVision not be used
31 * in advertising or publicity pertaining to distribution of the software
32 * without specific, written prior permission. OpenVision makes no
33 * representations about the suitability of this software for any
34 * purpose. It is provided "as is" without express or implied warranty.
36 * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
37 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
38 * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
39 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
40 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42 * PERFORMANCE OF THIS SOFTWARE.
49 * Determine platform-dependent configuration.
52 #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
53 #include <TargetConditionals.h>
55 #error "Use KfM 4.0 SDK headers for CFM compilation."
58 /* This is an API divergence in 1.2.3. This will be reconciled in 1.3, when
59 all platforms will have RFC-compliant OID declarations. */
60 #define GSS_RFC_COMPLIANT_OIDS 1
62 #define GSS_RFC_COMPLIANT_OIDS 0
67 #endif /* __cplusplus */
70 #if defined(__MWERKS__)
72 #pragma enumsalwaysint on
74 #pragma options align=mac68k
77 #if defined(_MSDOS) || defined(_WIN32)
81 /* #ifndef KRB5_CALLCONV */
83 #define KRB5_CALLCONV_C
86 #define KRB5_EXPORTVAR
93 #define GSS_SIZEOF_INT SIZEOF_INT
94 #define GSS_SIZEOF_LONG SIZEOF_LONG
95 #define GSS_SIZEOF_SHORT SIZEOF_SHORT
98 * Make sure we have a definition for PROTOTYPE.
100 #if !defined(PROTOTYPE)
101 #if defined(__STDC__) || defined(__cplusplus) || defined(_MSDOS) || defined(_WIN32) || defined(__ultrix)
102 #define PROTOTYPE(x) x
104 #define PROTOTYPE(x) ()
109 * First, include stddef.h to get size_t defined.
113 #endif /* HAVE_STDDEF_H */
116 * POSIX says that sys/types.h is where size_t is defined.
119 #include <sys/types.h>
123 * If the platform supports the xom.h header file, it should be included here.
127 #endif /* HAVE_XOM_H */
130 * $Id: gssapi.h,v 1.1 2004/10/19 00:22:57 neilbrown Exp $
134 * First, define the three platform-dependent pointer types.
137 typedef void FAR * gss_name_t;
138 typedef void FAR * gss_cred_id_t;
139 typedef void FAR * gss_ctx_id_t;
142 * The following type must be defined as the smallest natural unsigned integer
143 * supported by the platform that has at least 32 bits of precision.
145 #if (GSS_SIZEOF_SHORT == 4)
146 typedef unsigned short gss_uint32;
147 typedef short gss_int32;
148 #elif (GSS_SIZEOF_INT == 4)
149 typedef unsigned int gss_uint32;
150 typedef int gss_int32;
151 #elif (GSS_SIZEOF_LONG == 4)
152 typedef unsigned long gss_uint32;
153 typedef long gss_int32;
158 * We have included the xom.h header file. Use the definition for
159 * OM_object identifier.
161 typedef OM_object_identifier gss_OID_desc, *gss_OID;
162 #else /* OM_STRING */
164 * We can't use X/Open definitions, so roll our own.
166 typedef gss_uint32 OM_uint32;
168 typedef struct gss_OID_desc_struct {
171 } gss_OID_desc, FAR *gss_OID;
172 #endif /* OM_STRING */
174 typedef struct gss_OID_set_desc_struct {
177 } gss_OID_set_desc, FAR *gss_OID_set;
179 typedef struct gss_buffer_desc_struct {
182 } gss_buffer_desc, FAR *gss_buffer_t;
184 typedef struct gss_channel_bindings_struct {
185 OM_uint32 initiator_addrtype;
186 gss_buffer_desc initiator_address;
187 OM_uint32 acceptor_addrtype;
188 gss_buffer_desc acceptor_address;
189 gss_buffer_desc application_data;
190 } FAR *gss_channel_bindings_t;
193 * For now, define a QOP-type as an OM_uint32 (pending resolution of ongoing
196 typedef OM_uint32 gss_qop_t;
197 typedef int gss_cred_usage_t;
200 * Flag bits for context-level services.
202 #define GSS_C_DELEG_FLAG 1
203 #define GSS_C_MUTUAL_FLAG 2
204 #define GSS_C_REPLAY_FLAG 4
205 #define GSS_C_SEQUENCE_FLAG 8
206 #define GSS_C_CONF_FLAG 16
207 #define GSS_C_INTEG_FLAG 32
208 #define GSS_C_ANON_FLAG 64
209 #define GSS_C_PROT_READY_FLAG 128
210 #define GSS_C_TRANS_FLAG 256
213 * Credential usage options
216 #define GSS_C_INITIATE 1
217 #define GSS_C_ACCEPT 2
220 * Status code types for gss_display_status
222 #define GSS_C_GSS_CODE 1
223 #define GSS_C_MECH_CODE 2
226 * The constant definitions for channel-bindings address families
228 #define GSS_C_AF_UNSPEC 0
229 #define GSS_C_AF_LOCAL 1
230 #define GSS_C_AF_INET 2
231 #define GSS_C_AF_IMPLINK 3
232 #define GSS_C_AF_PUP 4
233 #define GSS_C_AF_CHAOS 5
234 #define GSS_C_AF_NS 6
235 #define GSS_C_AF_NBS 7
236 #define GSS_C_AF_ECMA 8
237 #define GSS_C_AF_DATAKIT 9
238 #define GSS_C_AF_CCITT 10
239 #define GSS_C_AF_SNA 11
240 #define GSS_C_AF_DECnet 12
241 #define GSS_C_AF_DLI 13
242 #define GSS_C_AF_LAT 14
243 #define GSS_C_AF_HYLINK 15
244 #define GSS_C_AF_APPLETALK 16
245 #define GSS_C_AF_BSC 17
246 #define GSS_C_AF_DSS 18
247 #define GSS_C_AF_OSI 19
248 #define GSS_C_AF_X25 21
250 #define GSS_C_AF_NULLADDR 255
253 * Various Null values.
255 #define GSS_C_NO_NAME ((gss_name_t) 0)
256 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
257 #define GSS_C_NO_OID ((gss_OID) 0)
258 #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
259 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
260 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
261 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
262 #define GSS_C_EMPTY_BUFFER {0, NULL}
265 * Some alternate names for a couple of the above values. These are defined
266 * for V1 compatibility.
268 #define GSS_C_NULL_OID GSS_C_NO_OID
269 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
272 * Define the default Quality of Protection for per-message services. Note
273 * that an implementation that offers multiple levels of QOP may either reserve
274 * a value (for example zero, as assumed here) to mean "default protection", or
275 * alternatively may simply equate GSS_C_QOP_DEFAULT to a specific explicit
276 * QOP value. However a value of 0 should always be interpreted by a GSSAPI
277 * implementation as a request for the default protection level.
279 #define GSS_C_QOP_DEFAULT 0
282 * Expiration time of 2^32-1 seconds means infinite lifetime for a
283 * credential or security context
285 #define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful)
288 /* Major status codes */
290 #define GSS_S_COMPLETE 0
293 * Some "helper" definitions to make the status code macros obvious.
295 #define GSS_C_CALLING_ERROR_OFFSET 24
296 #define GSS_C_ROUTINE_ERROR_OFFSET 16
297 #define GSS_C_SUPPLEMENTARY_OFFSET 0
298 #define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul)
299 #define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul)
300 #define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul)
303 * The macros that test status codes for error conditions. Note that the
304 * GSS_ERROR() macro has changed slightly from the V1 GSSAPI so that it now
305 * evaluates its argument only once.
307 #define GSS_CALLING_ERROR(x) \
308 ((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
309 #define GSS_ROUTINE_ERROR(x) \
310 ((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
311 #define GSS_SUPPLEMENTARY_INFO(x) \
312 ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
313 #define GSS_ERROR(x) \
314 ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
315 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
318 * Now the actual status code definitions
324 #define GSS_S_CALL_INACCESSIBLE_READ \
325 (((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET)
326 #define GSS_S_CALL_INACCESSIBLE_WRITE \
327 (((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET)
328 #define GSS_S_CALL_BAD_STRUCTURE \
329 (((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET)
334 #define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET)
335 #define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET)
336 #define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET)
337 #define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET)
338 #define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET)
339 #define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET)
340 #define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET)
341 #define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET)
342 #define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET)
343 #define GSS_S_DEFECTIVE_CREDENTIAL \
344 (((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET)
345 #define GSS_S_CREDENTIALS_EXPIRED \
346 (((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET)
347 #define GSS_S_CONTEXT_EXPIRED \
348 (((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET)
349 #define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET)
350 #define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET)
351 #define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET)
352 #define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET)
353 #define GSS_S_DUPLICATE_ELEMENT \
354 (((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET)
355 #define GSS_S_NAME_NOT_MN \
356 (((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET)
359 * Supplementary info bits:
361 #define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
362 #define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
363 #define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
364 #define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
365 #define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
369 * Finally, function prototypes for the GSSAPI routines.
372 /* Reserved static storage for GSS_oids. Comments are quotes from RFC 2744.
374 * The implementation must reserve static storage for a
375 * gss_OID_desc object containing the value
376 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"},
377 * corresponding to an object-identifier value of
378 * {iso(1) member-body(2) United States(840) mit(113554)
379 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
380 * GSS_C_NT_USER_NAME should be initialized to point
381 * to that gss_OID_desc.
383 extern const gss_OID_desc * const GSS_C_NT_USER_NAME;
386 * The implementation must reserve static storage for a
387 * gss_OID_desc object containing the value
388 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"},
389 * corresponding to an object-identifier value of
390 * {iso(1) member-body(2) United States(840) mit(113554)
391 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
392 * The constant GSS_C_NT_MACHINE_UID_NAME should be
393 * initialized to point to that gss_OID_desc.
395 extern const gss_OID_desc * const GSS_C_NT_MACHINE_UID_NAME;
398 * The implementation must reserve static storage for a
399 * gss_OID_desc object containing the value
400 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"},
401 * corresponding to an object-identifier value of
402 * {iso(1) member-body(2) United States(840) mit(113554)
403 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
404 * The constant GSS_C_NT_STRING_UID_NAME should be
405 * initialized to point to that gss_OID_desc.
407 extern const gss_OID_desc * const GSS_C_NT_STRING_UID_NAME;
410 * The implementation must reserve static storage for a
411 * gss_OID_desc object containing the value
412 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
413 * corresponding to an object-identifier value of
414 * {iso(1) org(3) dod(6) internet(1) security(5)
415 * nametypes(6) gss-host-based-services(2)). The constant
416 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
417 * to that gss_OID_desc. This is a deprecated OID value, and
418 * implementations wishing to support hostbased-service names
419 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
420 * defined below, to identify such names;
421 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
422 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
423 * parameter, but should not be emitted by GSS-API
425 GSS_DLLIMP extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
429 * The implementation must reserve static storage for a
430 * gss_OID_desc object containing the value
431 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
432 * "\x01\x02\x01\x04"}, corresponding to an
433 * object-identifier value of {iso(1) member-body(2)
434 * Unites States(840) mit(113554) infosys(1) gssapi(2)
435 * generic(1) service_name(4)}. The constant
436 * GSS_C_NT_HOSTBASED_SERVICE should be initialized
437 * to point to that gss_OID_desc.
439 extern const gss_OID_desc * const GSS_C_NT_HOSTBASED_SERVICE;
442 * The implementation must reserve static storage for a
443 * gss_OID_desc object containing the value
444 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
445 * corresponding to an object identifier value of
446 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
447 * 6(nametypes), 3(gss-anonymous-name)}. The constant
448 * and GSS_C_NT_ANONYMOUS should be initialized to point
449 * to that gss_OID_desc.
451 extern const gss_OID_desc * const GSS_C_NT_ANONYMOUS;
455 * The implementation must reserve static storage for a
456 * gss_OID_desc object containing the value
457 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
458 * corresponding to an object-identifier value of
459 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
460 * 6(nametypes), 4(gss-api-exported-name)}. The constant
461 * GSS_C_NT_EXPORT_NAME should be initialized to point
462 * to that gss_OID_desc.
464 extern const gss_OID_desc * const GSS_C_NT_EXPORT_NAME;
467 /* Function Prototypes */
469 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_acquire_cred
470 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
471 gss_name_t, /* desired_name */
472 OM_uint32, /* time_req */
473 gss_OID_set, /* desired_mechs */
474 gss_cred_usage_t, /* cred_usage */
475 gss_cred_id_t FAR *, /* output_cred_handle */
476 gss_OID_set FAR *, /* actual_mechs */
477 OM_uint32 FAR * /* time_rec */
480 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_cred
481 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
482 gss_cred_id_t FAR * /* cred_handle */
485 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_init_sec_context
486 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
487 gss_cred_id_t, /* claimant_cred_handle */
488 gss_ctx_id_t FAR *, /* context_handle */
489 gss_name_t, /* target_name */
490 gss_OID, /* mech_type (used to be const) */
491 OM_uint32, /* req_flags */
492 OM_uint32, /* time_req */
493 gss_channel_bindings_t, /* input_chan_bindings */
494 gss_buffer_t, /* input_token */
495 gss_OID FAR *, /* actual_mech_type */
496 gss_buffer_t, /* output_token */
497 OM_uint32 FAR *, /* ret_flags */
498 OM_uint32 FAR * /* time_rec */
501 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_accept_sec_context
502 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
503 gss_ctx_id_t FAR *, /* context_handle */
504 gss_cred_id_t, /* acceptor_cred_handle */
505 gss_buffer_t, /* input_token_buffer */
506 gss_channel_bindings_t, /* input_chan_bindings */
507 gss_name_t FAR *, /* src_name */
508 gss_OID FAR *, /* mech_type */
509 gss_buffer_t, /* output_token */
510 OM_uint32 FAR *, /* ret_flags */
511 OM_uint32 FAR *, /* time_rec */
512 gss_cred_id_t FAR * /* delegated_cred_handle */
515 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_process_context_token
516 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
517 gss_ctx_id_t, /* context_handle */
518 gss_buffer_t /* token_buffer */
521 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_delete_sec_context
522 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
523 gss_ctx_id_t FAR *, /* context_handle */
524 gss_buffer_t /* output_token */
527 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_context_time
528 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
529 gss_ctx_id_t, /* context_handle */
530 OM_uint32 FAR * /* time_rec */
534 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_get_mic
535 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
536 gss_ctx_id_t, /* context_handle */
537 gss_qop_t, /* qop_req */
538 gss_buffer_t, /* message_buffer */
539 gss_buffer_t /* message_token */
543 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_verify_mic
544 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
545 gss_ctx_id_t, /* context_handle */
546 gss_buffer_t, /* message_buffer */
547 gss_buffer_t, /* message_token */
548 gss_qop_t * /* qop_state */
552 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_wrap
553 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
554 gss_ctx_id_t, /* context_handle */
555 int, /* conf_req_flag */
556 gss_qop_t, /* qop_req */
557 gss_buffer_t, /* input_message_buffer */
558 int FAR *, /* conf_state */
559 gss_buffer_t /* output_message_buffer */
563 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_unwrap
564 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
565 gss_ctx_id_t, /* context_handle */
566 gss_buffer_t, /* input_message_buffer */
567 gss_buffer_t, /* output_message_buffer */
568 int FAR *, /* conf_state */
569 gss_qop_t FAR * /* qop_state */
572 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_display_status
573 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
574 OM_uint32, /* status_value */
575 int, /* status_type */
576 gss_OID, /* mech_type (used to be const) */
577 OM_uint32 FAR *, /* message_context */
578 gss_buffer_t /* status_string */
581 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_indicate_mechs
582 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
583 gss_OID_set FAR * /* mech_set */
586 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_compare_name
587 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
588 gss_name_t, /* name1 */
589 gss_name_t, /* name2 */
590 int FAR * /* name_equal */
593 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_display_name
594 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
595 gss_name_t, /* input_name */
596 gss_buffer_t, /* output_name_buffer */
597 gss_OID FAR * /* output_name_type */
600 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_import_name
601 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
602 gss_buffer_t, /* input_name_buffer */
603 gss_OID, /* input_name_type(used to be const) */
604 gss_name_t FAR * /* output_name */
607 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_name
608 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
609 gss_name_t FAR * /* input_name */
612 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_buffer
613 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
614 gss_buffer_t /* buffer */
617 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_oid_set
618 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
619 gss_OID_set FAR * /* set */
622 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_cred
623 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
624 gss_cred_id_t, /* cred_handle */
625 gss_name_t FAR *, /* name */
626 OM_uint32 FAR *, /* lifetime */
627 gss_cred_usage_t FAR *, /* cred_usage */
628 gss_OID_set FAR * /* mechanisms */
631 /* Last argument new for V2 */
632 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_context
633 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
634 gss_ctx_id_t, /* context_handle */
635 gss_name_t FAR *, /* src_name */
636 gss_name_t FAR *, /* targ_name */
637 OM_uint32 FAR *, /* lifetime_rec */
638 gss_OID FAR *, /* mech_type */
639 OM_uint32 FAR *, /* ctx_flags */
640 int FAR *, /* locally_initiated */
645 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_wrap_size_limit
646 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
647 gss_ctx_id_t, /* context_handle */
648 int, /* conf_req_flag */
649 gss_qop_t, /* qop_req */
650 OM_uint32, /* req_output_size */
651 OM_uint32 * /* max_input_size */
655 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_import_name_object
656 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
657 void FAR *, /* input_name */
658 gss_OID, /* input_name_type */
659 gss_name_t FAR * /* output_name */
663 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_export_name_object
664 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
665 gss_name_t, /* input_name */
666 gss_OID, /* desired_name_type */
667 void FAR * FAR * /* output_name */
671 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_add_cred
672 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
673 gss_cred_id_t, /* input_cred_handle */
674 gss_name_t, /* desired_name */
675 gss_OID, /* desired_mech */
676 gss_cred_usage_t, /* cred_usage */
677 OM_uint32, /* initiator_time_req */
678 OM_uint32, /* acceptor_time_req */
679 gss_cred_id_t FAR *, /* output_cred_handle */
680 gss_OID_set FAR *, /* actual_mechs */
681 OM_uint32 FAR *, /* initiator_time_rec */
682 OM_uint32 FAR * /* acceptor_time_rec */
686 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_cred_by_mech
687 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
688 gss_cred_id_t, /* cred_handle */
689 gss_OID, /* mech_type */
690 gss_name_t FAR *, /* name */
691 OM_uint32 FAR *, /* initiator_lifetime */
692 OM_uint32 FAR *, /* acceptor_lifetime */
693 gss_cred_usage_t FAR * /* cred_usage */
697 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_export_sec_context
698 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
699 gss_ctx_id_t FAR *, /* context_handle */
700 gss_buffer_t /* interprocess_token */
704 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_import_sec_context
705 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
706 gss_buffer_t, /* interprocess_token */
707 gss_ctx_id_t FAR * /* context_handle */
711 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_oid
712 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
713 gss_OID FAR * /* oid */
717 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_create_empty_oid_set
718 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
719 gss_OID_set FAR * /* oid_set */
723 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_add_oid_set_member
724 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
725 gss_OID, /* member_oid */
726 gss_OID_set FAR * /* oid_set */
730 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_test_oid_set_member
731 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
732 gss_OID, /* member */
733 gss_OID_set, /* set */
734 int FAR * /* present */
738 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_str_to_oid
739 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
740 gss_buffer_t, /* oid_str */
741 gss_OID FAR * /* oid */
745 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_oid_to_str
746 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
748 gss_buffer_t /* oid_str */
752 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_names_for_mech
753 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
754 gss_OID, /* mechanism */
755 gss_OID_set FAR * /* name_types */
759 * The following routines are obsolete variants of gss_get_mic, gss_wrap,
760 * gss_verify_mic and gss_unwrap. They should be provided by GSSAPI V2
761 * implementations for backwards compatibility with V1 applications. Distinct
762 * entrypoints (as opposed to #defines) should be provided, to allow GSSAPI
763 * V1 applications to link against GSSAPI V2 implementations.
765 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_sign
766 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
767 gss_ctx_id_t, /* context_handle */
769 gss_buffer_t, /* message_buffer */
770 gss_buffer_t /* message_token */
773 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_verify
774 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
775 gss_ctx_id_t, /* context_handle */
776 gss_buffer_t, /* message_buffer */
777 gss_buffer_t, /* token_buffer */
778 int FAR * /* qop_state */
781 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_seal
782 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
783 gss_ctx_id_t, /* context_handle */
784 int, /* conf_req_flag */
786 gss_buffer_t, /* input_message_buffer */
787 int FAR *, /* conf_state */
788 gss_buffer_t /* output_message_buffer */
791 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_unseal
792 PROTOTYPE( (OM_uint32 FAR *, /* minor_status */
793 gss_ctx_id_t, /* context_handle */
794 gss_buffer_t, /* input_message_buffer */
795 gss_buffer_t, /* output_message_buffer */
796 int FAR *, /* conf_state */
797 int FAR * /* qop_state */
801 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_export_name
802 PROTOTYPE( (OM_uint32 *, /* minor_status */
803 const gss_name_t, /* input_name */
804 gss_buffer_t /* exported_name */
808 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_duplicate_name
809 PROTOTYPE( (OM_uint32 *, /* minor_status */
810 const gss_name_t, /* input_name */
811 gss_name_t * /* dest_name */
815 GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_canonicalize_name
816 PROTOTYPE( (OM_uint32 *, /* minor_status */
817 const gss_name_t, /* input_name */
818 const gss_OID, /* mech_type */
819 gss_name_t * /* output_name */
823 #if defined(__MWERKS__)
824 #pragma enumsalwaysint reset
827 #pragma options align=reset
832 #endif /* __cplusplus */
834 /* XXXX these are not part of the GSSAPI C bindings! (but should be) */
836 #define GSS_CALLING_ERROR_FIELD(x) \
837 (((x) >> GSS_C_CALLING_ERROR_OFFSET) & GSS_C_CALLING_ERROR_MASK)
838 #define GSS_ROUTINE_ERROR_FIELD(x) \
839 (((x) >> GSS_C_ROUTINE_ERROR_OFFSET) & GSS_C_ROUTINE_ERROR_MASK)
840 #define GSS_SUPPLEMENTARY_INFO_FIELD(x) \
841 (((x) >> GSS_C_SUPPLEMENTARY_OFFSET) & GSS_C_SUPPLEMENTARY_MASK)
843 /* XXXX This is a necessary evil until the spec is fixed */
844 #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE
846 #endif /* _GSSAPI_H_ */