2 * Copyright 1993 by OpenVision Technologies, Inc.
4 * Permission to use, copy, modify, distribute, and sell this software
5 * and its documentation for any purpose is hereby granted without fee,
6 * provided that the above copyright notice appears in all copies and
7 * that both that copyright notice and this permission notice appear in
8 * supporting documentation, and that the name of OpenVision not be used
9 * in advertising or publicity pertaining to distribution of the software
10 * without specific, written prior permission. OpenVision makes no
11 * representations about the suitability of this software for any
12 * purpose. It is provided "as is" without express or implied warranty.
14 * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
18 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
27 * Determine platform-dependent configuration.
30 #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
31 # include <TargetConditionals.h>
32 # if TARGET_RT_MAC_CFM
33 # error "Use KfM 4.0 SDK headers for CFM compilation."
39 #endif /* __cplusplus */
42 # if defined(__MWERKS__)
45 # pragma options align=mac68k
48 #if defined(_MSDOS) || defined(_WIN32)
54 #define KRB5_CALLCONV_C
57 #define GSS_SIZEOF_INT SIZEOF_INT
58 #define GSS_SIZEOF_LONG SIZEOF_LONG
59 #define GSS_SIZEOF_SHORT SIZEOF_SHORT
62 * First, include stddef.h to get size_t defined.
66 #endif /* HAVE_STDDEF_H */
69 * POSIX says that sys/types.h is where size_t is defined.
71 #include <sys/types.h>
74 * If the platform supports the xom.h header file, it should be included here.
78 #endif /* HAVE_XOM_H */
85 * First, define the three platform-dependent pointer types.
88 typedef void * gss_name_t;
89 typedef void * gss_cred_id_t;
90 typedef void * gss_ctx_id_t;
93 * The following type must be defined as the smallest natural unsigned integer
94 * supported by the platform that has at least 32 bits of precision.
96 #if (GSS_SIZEOF_SHORT == 4)
97 typedef unsigned short gss_uint32;
98 typedef short gss_int32;
99 #elif (GSS_SIZEOF_INT == 4)
100 typedef unsigned int gss_uint32;
101 typedef int gss_int32;
102 #elif (GSS_SIZEOF_LONG == 4)
103 typedef unsigned long gss_uint32;
104 typedef long gss_int32;
109 * We have included the xom.h header file. Use the definition for
110 * OM_object identifier.
112 typedef OM_object_identifier gss_OID_desc, *gss_OID;
113 #else /* OM_STRING */
115 * We can't use X/Open definitions, so roll our own.
117 typedef gss_uint32 OM_uint32;
119 typedef struct gss_OID_desc_struct {
122 } gss_OID_desc, *gss_OID;
123 #endif /* OM_STRING */
125 typedef struct gss_OID_set_desc_struct {
128 } gss_OID_set_desc, *gss_OID_set;
130 typedef struct gss_buffer_desc_struct {
133 } gss_buffer_desc, *gss_buffer_t;
135 typedef struct gss_channel_bindings_struct {
136 OM_uint32 initiator_addrtype;
137 gss_buffer_desc initiator_address;
138 OM_uint32 acceptor_addrtype;
139 gss_buffer_desc acceptor_address;
140 gss_buffer_desc application_data;
141 } *gss_channel_bindings_t;
144 * For now, define a QOP-type as an OM_uint32 (pending resolution of ongoing
147 typedef OM_uint32 gss_qop_t;
148 typedef int gss_cred_usage_t;
151 * Flag bits for context-level services.
153 #define GSS_C_DELEG_FLAG 1
154 #define GSS_C_MUTUAL_FLAG 2
155 #define GSS_C_REPLAY_FLAG 4
156 #define GSS_C_SEQUENCE_FLAG 8
157 #define GSS_C_CONF_FLAG 16
158 #define GSS_C_INTEG_FLAG 32
159 #define GSS_C_ANON_FLAG 64
160 #define GSS_C_PROT_READY_FLAG 128
161 #define GSS_C_TRANS_FLAG 256
164 * Credential usage options
167 #define GSS_C_INITIATE 1
168 #define GSS_C_ACCEPT 2
171 * Status code types for gss_display_status
173 #define GSS_C_GSS_CODE 1
174 #define GSS_C_MECH_CODE 2
177 * The constant definitions for channel-bindings address families
179 #define GSS_C_AF_UNSPEC 0
180 #define GSS_C_AF_LOCAL 1
181 #define GSS_C_AF_INET 2
182 #define GSS_C_AF_IMPLINK 3
183 #define GSS_C_AF_PUP 4
184 #define GSS_C_AF_CHAOS 5
185 #define GSS_C_AF_NS 6
186 #define GSS_C_AF_NBS 7
187 #define GSS_C_AF_ECMA 8
188 #define GSS_C_AF_DATAKIT 9
189 #define GSS_C_AF_CCITT 10
190 #define GSS_C_AF_SNA 11
191 #define GSS_C_AF_DECnet 12
192 #define GSS_C_AF_DLI 13
193 #define GSS_C_AF_LAT 14
194 #define GSS_C_AF_HYLINK 15
195 #define GSS_C_AF_APPLETALK 16
196 #define GSS_C_AF_BSC 17
197 #define GSS_C_AF_DSS 18
198 #define GSS_C_AF_OSI 19
199 #define GSS_C_AF_X25 21
201 #define GSS_C_AF_NULLADDR 255
204 * Various Null values.
206 #define GSS_C_NO_NAME ((gss_name_t) 0)
207 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
208 #define GSS_C_NO_OID ((gss_OID) 0)
209 #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
210 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
211 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
212 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
213 #define GSS_C_EMPTY_BUFFER {0, NULL}
216 * Some alternate names for a couple of the above values. These are defined
217 * for V1 compatibility.
219 #define GSS_C_NULL_OID GSS_C_NO_OID
220 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
223 * Define the default Quality of Protection for per-message services. Note
224 * that an implementation that offers multiple levels of QOP may either reserve
225 * a value (for example zero, as assumed here) to mean "default protection", or
226 * alternatively may simply equate GSS_C_QOP_DEFAULT to a specific explicit
227 * QOP value. However a value of 0 should always be interpreted by a GSSAPI
228 * implementation as a request for the default protection level.
230 #define GSS_C_QOP_DEFAULT 0
233 * Expiration time of 2^32-1 seconds means infinite lifetime for a
234 * credential or security context
236 #define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful)
239 /* Major status codes */
241 #define GSS_S_COMPLETE 0
244 * Some "helper" definitions to make the status code macros obvious.
246 #define GSS_C_CALLING_ERROR_OFFSET 24
247 #define GSS_C_ROUTINE_ERROR_OFFSET 16
248 #define GSS_C_SUPPLEMENTARY_OFFSET 0
249 #define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul)
250 #define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul)
251 #define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul)
254 * The macros that test status codes for error conditions. Note that the
255 * GSS_ERROR() macro has changed slightly from the V1 GSSAPI so that it now
256 * evaluates its argument only once.
258 #define GSS_CALLING_ERROR(x) \
259 ((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
260 #define GSS_ROUTINE_ERROR(x) \
261 ((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
262 #define GSS_SUPPLEMENTARY_INFO(x) \
263 ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
264 #define GSS_ERROR(x) \
265 ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
266 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
269 * Now the actual status code definitions
275 #define GSS_S_CALL_INACCESSIBLE_READ \
276 (((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET)
277 #define GSS_S_CALL_INACCESSIBLE_WRITE \
278 (((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET)
279 #define GSS_S_CALL_BAD_STRUCTURE \
280 (((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET)
285 #define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET)
286 #define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET)
287 #define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET)
288 #define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET)
289 #define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET)
290 #define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET)
291 #define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET)
292 #define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET)
293 #define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET)
294 #define GSS_S_DEFECTIVE_CREDENTIAL \
295 (((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET)
296 #define GSS_S_CREDENTIALS_EXPIRED \
297 (((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET)
298 #define GSS_S_CONTEXT_EXPIRED \
299 (((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET)
300 #define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET)
301 #define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET)
302 #define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET)
303 #define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET)
304 #define GSS_S_DUPLICATE_ELEMENT \
305 (((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET)
306 #define GSS_S_NAME_NOT_MN \
307 (((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET)
310 * Supplementary info bits:
312 #define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
313 #define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
314 #define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
315 #define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
316 #define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
320 * Finally, function prototypes for the GSSAPI routines.
323 #if defined (_WIN32) && defined (_MSC_VER)
325 # define GSS_DLLIMP __declspec(dllexport)
327 # define GSS_DLLIMP __declspec(dllimport)
333 /* Reserved static storage for GSS_oids. Comments are quotes from RFC 2744.
335 * The implementation must reserve static storage for a
336 * gss_OID_desc object containing the value
337 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"},
338 * corresponding to an object-identifier value of
339 * {iso(1) member-body(2) United States(840) mit(113554)
340 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant
341 * GSS_C_NT_USER_NAME should be initialized to point
342 * to that gss_OID_desc.
344 GSS_DLLIMP extern gss_OID GSS_C_NT_USER_NAME;
347 * The implementation must reserve static storage for a
348 * gss_OID_desc object containing the value
349 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"},
350 * corresponding to an object-identifier value of
351 * {iso(1) member-body(2) United States(840) mit(113554)
352 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
353 * The constant GSS_C_NT_MACHINE_UID_NAME should be
354 * initialized to point to that gss_OID_desc.
356 GSS_DLLIMP extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
359 * The implementation must reserve static storage for a
360 * gss_OID_desc object containing the value
361 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"},
362 * corresponding to an object-identifier value of
363 * {iso(1) member-body(2) United States(840) mit(113554)
364 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
365 * The constant GSS_C_NT_STRING_UID_NAME should be
366 * initialized to point to that gss_OID_desc.
368 GSS_DLLIMP extern gss_OID GSS_C_NT_STRING_UID_NAME;
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\x02"},
374 * corresponding to an object-identifier value of
375 * {iso(1) org(3) dod(6) internet(1) security(5)
376 * nametypes(6) gss-host-based-services(2)). The constant
377 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
378 * to that gss_OID_desc. This is a deprecated OID value, and
379 * implementations wishing to support hostbased-service names
380 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
381 * defined below, to identify such names;
382 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
383 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
384 * parameter, but should not be emitted by GSS-API
387 GSS_DLLIMP extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
390 * The implementation must reserve static storage for a
391 * gss_OID_desc object containing the value
392 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
393 * "\x01\x02\x01\x04"}, corresponding to an
394 * object-identifier value of {iso(1) member-body(2)
395 * Unites States(840) mit(113554) infosys(1) gssapi(2)
396 * generic(1) service_name(4)}. The constant
397 * GSS_C_NT_HOSTBASED_SERVICE should be initialized
398 * to point to that gss_OID_desc.
400 GSS_DLLIMP extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
403 * The implementation must reserve static storage for a
404 * gss_OID_desc object containing the value
405 * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
406 * corresponding to an object identifier value of
407 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
408 * 6(nametypes), 3(gss-anonymous-name)}. The constant
409 * and GSS_C_NT_ANONYMOUS should be initialized to point
410 * to that gss_OID_desc.
412 GSS_DLLIMP extern gss_OID GSS_C_NT_ANONYMOUS;
416 * The implementation must reserve static storage for a
417 * gss_OID_desc object containing the value
418 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
419 * corresponding to an object-identifier value of
420 * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
421 * 6(nametypes), 4(gss-api-exported-name)}. The constant
422 * GSS_C_NT_EXPORT_NAME should be initialized to point
423 * to that gss_OID_desc.
425 GSS_DLLIMP extern gss_OID GSS_C_NT_EXPORT_NAME;
427 /* Function Prototypes */
429 OM_uint32 KRB5_CALLCONV gss_acquire_cred
430 (OM_uint32 *, /* minor_status */
431 gss_name_t, /* desired_name */
432 OM_uint32, /* time_req */
433 gss_OID_set, /* desired_mechs */
434 gss_cred_usage_t, /* cred_usage */
435 gss_cred_id_t *, /* output_cred_handle */
436 gss_OID_set *, /* actual_mechs */
437 OM_uint32 * /* time_rec */
440 OM_uint32 KRB5_CALLCONV gss_release_cred
441 (OM_uint32 *, /* minor_status */
442 gss_cred_id_t * /* cred_handle */
445 OM_uint32 KRB5_CALLCONV gss_init_sec_context
446 (OM_uint32 *, /* minor_status */
447 gss_cred_id_t, /* claimant_cred_handle */
448 gss_ctx_id_t *, /* context_handle */
449 gss_name_t, /* target_name */
450 gss_OID, /* mech_type (used to be const) */
451 OM_uint32, /* req_flags */
452 OM_uint32, /* time_req */
453 gss_channel_bindings_t, /* input_chan_bindings */
454 gss_buffer_t, /* input_token */
455 gss_OID *, /* actual_mech_type */
456 gss_buffer_t, /* output_token */
457 OM_uint32 *, /* ret_flags */
458 OM_uint32 * /* time_rec */
461 OM_uint32 KRB5_CALLCONV gss_accept_sec_context
462 (OM_uint32 *, /* minor_status */
463 gss_ctx_id_t *, /* context_handle */
464 gss_cred_id_t, /* acceptor_cred_handle */
465 gss_buffer_t, /* input_token_buffer */
466 gss_channel_bindings_t, /* input_chan_bindings */
467 gss_name_t *, /* src_name */
468 gss_OID *, /* mech_type */
469 gss_buffer_t, /* output_token */
470 OM_uint32 *, /* ret_flags */
471 OM_uint32 *, /* time_rec */
472 gss_cred_id_t * /* delegated_cred_handle */
475 OM_uint32 KRB5_CALLCONV gss_process_context_token
476 (OM_uint32 *, /* minor_status */
477 gss_ctx_id_t, /* context_handle */
478 gss_buffer_t /* token_buffer */
481 OM_uint32 KRB5_CALLCONV gss_delete_sec_context
482 (OM_uint32 *, /* minor_status */
483 gss_ctx_id_t *, /* context_handle */
484 gss_buffer_t /* output_token */
487 OM_uint32 KRB5_CALLCONV gss_context_time
488 (OM_uint32 *, /* minor_status */
489 gss_ctx_id_t, /* context_handle */
490 OM_uint32 * /* time_rec */
494 OM_uint32 KRB5_CALLCONV gss_get_mic
495 (OM_uint32 *, /* minor_status */
496 gss_ctx_id_t, /* context_handle */
497 gss_qop_t, /* qop_req */
498 gss_buffer_t, /* message_buffer */
499 gss_buffer_t /* message_token */
503 OM_uint32 KRB5_CALLCONV gss_verify_mic
504 (OM_uint32 *, /* minor_status */
505 gss_ctx_id_t, /* context_handle */
506 gss_buffer_t, /* message_buffer */
507 gss_buffer_t, /* message_token */
508 gss_qop_t * /* qop_state */
512 OM_uint32 KRB5_CALLCONV gss_wrap
513 (OM_uint32 *, /* minor_status */
514 gss_ctx_id_t, /* context_handle */
515 int, /* conf_req_flag */
516 gss_qop_t, /* qop_req */
517 gss_buffer_t, /* input_message_buffer */
518 int *, /* conf_state */
519 gss_buffer_t /* output_message_buffer */
523 OM_uint32 KRB5_CALLCONV gss_unwrap
524 (OM_uint32 *, /* minor_status */
525 gss_ctx_id_t, /* context_handle */
526 gss_buffer_t, /* input_message_buffer */
527 gss_buffer_t, /* output_message_buffer */
528 int *, /* conf_state */
529 gss_qop_t * /* qop_state */
532 OM_uint32 KRB5_CALLCONV gss_display_status
533 (OM_uint32 *, /* minor_status */
534 OM_uint32, /* status_value */
535 int, /* status_type */
536 gss_OID, /* mech_type (used to be const) */
537 OM_uint32 *, /* message_context */
538 gss_buffer_t /* status_string */
541 OM_uint32 KRB5_CALLCONV gss_indicate_mechs
542 (OM_uint32 *, /* minor_status */
543 gss_OID_set * /* mech_set */
546 OM_uint32 KRB5_CALLCONV gss_compare_name
547 (OM_uint32 *, /* minor_status */
548 gss_name_t, /* name1 */
549 gss_name_t, /* name2 */
550 int * /* name_equal */
553 OM_uint32 KRB5_CALLCONV gss_display_name
554 (OM_uint32 *, /* minor_status */
555 gss_name_t, /* input_name */
556 gss_buffer_t, /* output_name_buffer */
557 gss_OID * /* output_name_type */
560 OM_uint32 KRB5_CALLCONV gss_import_name
561 (OM_uint32 *, /* minor_status */
562 gss_buffer_t, /* input_name_buffer */
563 gss_OID, /* input_name_type(used to be const) */
564 gss_name_t * /* output_name */
567 OM_uint32 KRB5_CALLCONV gss_release_name
568 (OM_uint32 *, /* minor_status */
569 gss_name_t * /* input_name */
572 OM_uint32 KRB5_CALLCONV gss_release_buffer
573 (OM_uint32 *, /* minor_status */
574 gss_buffer_t /* buffer */
577 OM_uint32 KRB5_CALLCONV gss_release_oid_set
578 (OM_uint32 *, /* minor_status */
579 gss_OID_set * /* set */
582 OM_uint32 KRB5_CALLCONV gss_inquire_cred
583 (OM_uint32 *, /* minor_status */
584 gss_cred_id_t, /* cred_handle */
585 gss_name_t *, /* name */
586 OM_uint32 *, /* lifetime */
587 gss_cred_usage_t *, /* cred_usage */
588 gss_OID_set * /* mechanisms */
591 /* Last argument new for V2 */
592 OM_uint32 KRB5_CALLCONV gss_inquire_context
593 (OM_uint32 *, /* minor_status */
594 gss_ctx_id_t, /* context_handle */
595 gss_name_t *, /* src_name */
596 gss_name_t *, /* targ_name */
597 OM_uint32 *, /* lifetime_rec */
598 gss_OID *, /* mech_type */
599 OM_uint32 *, /* ctx_flags */
600 int *, /* locally_initiated */
605 OM_uint32 KRB5_CALLCONV gss_wrap_size_limit
606 (OM_uint32 *, /* minor_status */
607 gss_ctx_id_t, /* context_handle */
608 int, /* conf_req_flag */
609 gss_qop_t, /* qop_req */
610 OM_uint32, /* req_output_size */
611 OM_uint32 * /* max_input_size */
615 OM_uint32 KRB5_CALLCONV gss_import_name_object
616 (OM_uint32 *, /* minor_status */
617 void *, /* input_name */
618 gss_OID, /* input_name_type */
619 gss_name_t * /* output_name */
623 OM_uint32 KRB5_CALLCONV gss_export_name_object
624 (OM_uint32 *, /* minor_status */
625 gss_name_t, /* input_name */
626 gss_OID, /* desired_name_type */
627 void ** /* output_name */
631 OM_uint32 KRB5_CALLCONV gss_add_cred
632 (OM_uint32 *, /* minor_status */
633 gss_cred_id_t, /* input_cred_handle */
634 gss_name_t, /* desired_name */
635 gss_OID, /* desired_mech */
636 gss_cred_usage_t, /* cred_usage */
637 OM_uint32, /* initiator_time_req */
638 OM_uint32, /* acceptor_time_req */
639 gss_cred_id_t *, /* output_cred_handle */
640 gss_OID_set *, /* actual_mechs */
641 OM_uint32 *, /* initiator_time_rec */
642 OM_uint32 * /* acceptor_time_rec */
646 OM_uint32 KRB5_CALLCONV gss_inquire_cred_by_mech
647 (OM_uint32 *, /* minor_status */
648 gss_cred_id_t, /* cred_handle */
649 gss_OID, /* mech_type */
650 gss_name_t *, /* name */
651 OM_uint32 *, /* initiator_lifetime */
652 OM_uint32 *, /* acceptor_lifetime */
653 gss_cred_usage_t * /* cred_usage */
657 OM_uint32 KRB5_CALLCONV gss_export_sec_context
658 (OM_uint32 *, /* minor_status */
659 gss_ctx_id_t *, /* context_handle */
660 gss_buffer_t /* interprocess_token */
664 OM_uint32 KRB5_CALLCONV gss_import_sec_context
665 (OM_uint32 *, /* minor_status */
666 gss_buffer_t, /* interprocess_token */
667 gss_ctx_id_t * /* context_handle */
671 OM_uint32 KRB5_CALLCONV gss_release_oid
672 (OM_uint32 *, /* minor_status */
677 OM_uint32 KRB5_CALLCONV gss_create_empty_oid_set
678 (OM_uint32 *, /* minor_status */
679 gss_OID_set * /* oid_set */
683 OM_uint32 KRB5_CALLCONV gss_add_oid_set_member
684 (OM_uint32 *, /* minor_status */
685 gss_OID, /* member_oid */
686 gss_OID_set * /* oid_set */
690 OM_uint32 KRB5_CALLCONV gss_test_oid_set_member
691 (OM_uint32 *, /* minor_status */
692 gss_OID, /* member */
693 gss_OID_set, /* set */
698 OM_uint32 KRB5_CALLCONV gss_str_to_oid
699 (OM_uint32 *, /* minor_status */
700 gss_buffer_t, /* oid_str */
705 OM_uint32 KRB5_CALLCONV gss_oid_to_str
706 (OM_uint32 *, /* minor_status */
708 gss_buffer_t /* oid_str */
712 OM_uint32 KRB5_CALLCONV gss_inquire_names_for_mech
713 (OM_uint32 *, /* minor_status */
714 gss_OID, /* mechanism */
715 gss_OID_set * /* name_types */
719 * The following routines are obsolete variants of gss_get_mic, gss_wrap,
720 * gss_verify_mic and gss_unwrap. They should be provided by GSSAPI V2
721 * implementations for backwards compatibility with V1 applications. Distinct
722 * entrypoints (as opposed to #defines) should be provided, to allow GSSAPI
723 * V1 applications to link against GSSAPI V2 implementations.
725 OM_uint32 KRB5_CALLCONV gss_sign
726 (OM_uint32 *, /* minor_status */
727 gss_ctx_id_t, /* context_handle */
729 gss_buffer_t, /* message_buffer */
730 gss_buffer_t /* message_token */
733 OM_uint32 KRB5_CALLCONV gss_verify
734 (OM_uint32 *, /* minor_status */
735 gss_ctx_id_t, /* context_handle */
736 gss_buffer_t, /* message_buffer */
737 gss_buffer_t, /* token_buffer */
738 int * /* qop_state */
741 OM_uint32 KRB5_CALLCONV gss_seal
742 (OM_uint32 *, /* minor_status */
743 gss_ctx_id_t, /* context_handle */
744 int, /* conf_req_flag */
746 gss_buffer_t, /* input_message_buffer */
747 int *, /* conf_state */
748 gss_buffer_t /* output_message_buffer */
751 OM_uint32 KRB5_CALLCONV gss_unseal
752 (OM_uint32 *, /* minor_status */
753 gss_ctx_id_t, /* context_handle */
754 gss_buffer_t, /* input_message_buffer */
755 gss_buffer_t, /* output_message_buffer */
756 int *, /* conf_state */
757 int * /* qop_state */
761 OM_uint32 KRB5_CALLCONV gss_export_name
762 (OM_uint32 *, /* minor_status */
763 const gss_name_t, /* input_name */
764 gss_buffer_t /* exported_name */
768 OM_uint32 KRB5_CALLCONV gss_duplicate_name
769 (OM_uint32 *, /* minor_status */
770 const gss_name_t, /* input_name */
771 gss_name_t * /* dest_name */
775 OM_uint32 KRB5_CALLCONV gss_canonicalize_name
776 (OM_uint32 *, /* minor_status */
777 const gss_name_t, /* input_name */
778 const gss_OID, /* mech_type */
779 gss_name_t * /* output_name */
783 # if defined(__MWERKS__)
784 # pragma import reset
786 # pragma options align=reset
793 /* XXXX these are not part of the GSSAPI C bindings! (but should be) */
795 #define GSS_CALLING_ERROR_FIELD(x) \
796 (((x) >> GSS_C_CALLING_ERROR_OFFSET) & GSS_C_CALLING_ERROR_MASK)
797 #define GSS_ROUTINE_ERROR_FIELD(x) \
798 (((x) >> GSS_C_ROUTINE_ERROR_OFFSET) & GSS_C_ROUTINE_ERROR_MASK)
799 #define GSS_SUPPLEMENTARY_INFO_FIELD(x) \
800 (((x) >> GSS_C_SUPPLEMENTARY_OFFSET) & GSS_C_SUPPLEMENTARY_MASK)
802 /* XXXX This is a necessary evil until the spec is fixed */
803 #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE
805 #endif /* _GSSAPI_H_ */