michael@0: /* vim:set ts=4 sw=4 sts=4 et cindent: */ michael@0: /* ***** BEGIN LICENSE BLOCK ***** michael@0: * Copyright 1993 by OpenVision Technologies, Inc. michael@0: * michael@0: * Permission to use, copy, modify, distribute, and sell this software michael@0: * and its documentation for any purpose is hereby granted without fee, michael@0: * provided that the above copyright notice appears in all copies and michael@0: * that both that copyright notice and this permission notice appear in michael@0: * supporting documentation, and that the name of OpenVision not be used michael@0: * in advertising or publicity pertaining to distribution of the software michael@0: * without specific, written prior permission. OpenVision makes no michael@0: * representations about the suitability of this software for any michael@0: * purpose. It is provided "as is" without express or implied warranty. michael@0: * michael@0: * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, michael@0: * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO michael@0: * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR michael@0: * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF michael@0: * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR michael@0: * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR michael@0: * PERFORMANCE OF THIS SOFTWARE. michael@0: ****** END LICENSE BLOCK ***** */ michael@0: michael@0: #ifndef GSSAPI_H_ michael@0: #define GSSAPI_H_ michael@0: michael@0: /* michael@0: * Also define _GSSAPI_H_ as that is what the Kerberos 5 code defines and michael@0: * what header files on some systems look for. michael@0: */ michael@0: #define _GSSAPI_H_ michael@0: michael@0: /* michael@0: * On Mac OS X, Kerberos/Kerberos.h is used to gain access to certain michael@0: * system-specific Kerberos functions, but on 10.4, that file also brings michael@0: * in other headers that conflict with this one. michael@0: */ michael@0: #define _GSSAPI_GENERIC_H_ michael@0: #define _GSSAPI_KRB5_H_ michael@0: michael@0: /* michael@0: * Define windows specific needed parameters. michael@0: */ michael@0: michael@0: #ifndef GSS_CALLCONV michael@0: #if defined(_WIN32) michael@0: #define GSS_CALLCONV __stdcall michael@0: #define GSS_CALLCONV_C __cdecl michael@0: #else michael@0: #define GSS_CALLCONV michael@0: #define GSS_CALLCONV_C michael@0: #endif michael@0: #endif /* GSS_CALLCONV */ michael@0: michael@0: #ifdef GSS_USE_FUNCTION_POINTERS michael@0: #ifdef _WIN32 michael@0: #undef GSS_CALLCONV michael@0: #define GSS_CALLCONV michael@0: #define GSS_FUNC(f) (__stdcall *f##_type) michael@0: #else michael@0: #define GSS_FUNC(f) (*f##_type) michael@0: #endif michael@0: #define GSS_MAKE_TYPEDEF typedef michael@0: #else michael@0: #define GSS_FUNC(f) f michael@0: #define GSS_MAKE_TYPEDEF michael@0: #endif michael@0: michael@0: /* michael@0: * First, include stddef.h to get size_t defined. michael@0: */ michael@0: #include michael@0: michael@0: /* michael@0: * Configure set the following michael@0: */ michael@0: michael@0: #ifndef SIZEOF_LONG michael@0: #undef SIZEOF_LONG michael@0: #endif michael@0: #ifndef SIZEOF_SHORT michael@0: #undef SIZEOF_SHORT michael@0: #endif michael@0: michael@0: #ifndef EXTERN_C_BEGIN michael@0: #ifdef __cplusplus michael@0: #define EXTERN_C_BEGIN extern "C" { michael@0: #define EXTERN_C_END } michael@0: #else michael@0: #define EXTERN_C_BEGIN michael@0: #define EXTERN_C_END michael@0: #endif michael@0: #endif michael@0: michael@0: EXTERN_C_BEGIN michael@0: michael@0: #if defined(XP_MACOSX) michael@0: # pragma pack(push,2) michael@0: #endif michael@0: michael@0: /* michael@0: * If the platform supports the xom.h header file, it should be michael@0: * included here. michael@0: */ michael@0: /* #include */ michael@0: michael@0: michael@0: /* michael@0: * Now define the three implementation-dependent types. michael@0: */ michael@0: michael@0: typedef void * gss_name_t ; michael@0: typedef void * gss_ctx_id_t ; michael@0: typedef void * gss_cred_id_t ; michael@0: michael@0: michael@0: /* michael@0: * The following type must be defined as the smallest natural michael@0: * unsigned integer supported by the platform that has at least michael@0: * 32 bits of precision. michael@0: */ michael@0: michael@0: #if SIZEOF_LONG == 4 michael@0: typedef unsigned long gss_uint32; michael@0: #elif SIZEOF_SHORT == 4 michael@0: typedef unsigned short gss_uint32; michael@0: #else michael@0: typedef unsigned int gss_uint32; michael@0: #endif michael@0: michael@0: #ifdef OM_STRING michael@0: michael@0: /* michael@0: * We have included the xom.h header file. Verify that OM_uint32 michael@0: * is defined correctly. michael@0: */ michael@0: michael@0: #if sizeof(gss_uint32) != sizeof(OM_uint32) michael@0: #error Incompatible definition of OM_uint32 from xom.h michael@0: #endif michael@0: michael@0: typedef OM_object_identifier gss_OID_desc, *gss_OID; michael@0: michael@0: #else /* !OM_STRING */ michael@0: michael@0: /* michael@0: * We can't use X/Open definitions, so roll our own. michael@0: */ michael@0: typedef gss_uint32 OM_uint32; michael@0: typedef struct gss_OID_desc_struct { michael@0: OM_uint32 length; michael@0: void *elements; michael@0: } gss_OID_desc, *gss_OID; michael@0: michael@0: #endif /* !OM_STRING */ michael@0: michael@0: typedef struct gss_OID_set_desc_struct { michael@0: size_t count; michael@0: gss_OID elements; michael@0: } gss_OID_set_desc, *gss_OID_set; michael@0: michael@0: michael@0: /* michael@0: * For now, define a QOP-type as an OM_uint32 michael@0: */ michael@0: typedef OM_uint32 gss_qop_t; michael@0: michael@0: typedef int gss_cred_usage_t; michael@0: michael@0: michael@0: typedef struct gss_buffer_desc_struct { michael@0: size_t length; michael@0: void *value; michael@0: } gss_buffer_desc, *gss_buffer_t; michael@0: michael@0: typedef struct gss_channel_bindings_struct { michael@0: OM_uint32 initiator_addrtype; michael@0: gss_buffer_desc initiator_address; michael@0: OM_uint32 acceptor_addrtype; michael@0: gss_buffer_desc acceptor_address; michael@0: gss_buffer_desc application_data; michael@0: } *gss_channel_bindings_t; michael@0: michael@0: michael@0: /* michael@0: * Flag bits for context-level services. michael@0: */ michael@0: #define GSS_C_DELEG_FLAG 1 michael@0: #define GSS_C_MUTUAL_FLAG 2 michael@0: #define GSS_C_REPLAY_FLAG 4 michael@0: #define GSS_C_SEQUENCE_FLAG 8 michael@0: #define GSS_C_CONF_FLAG 16 michael@0: #define GSS_C_INTEG_FLAG 32 michael@0: #define GSS_C_ANON_FLAG 64 michael@0: #define GSS_C_PROT_READY_FLAG 128 michael@0: #define GSS_C_TRANS_FLAG 256 michael@0: michael@0: /* michael@0: * Credential usage options michael@0: */ michael@0: #define GSS_C_BOTH 0 michael@0: #define GSS_C_INITIATE 1 michael@0: #define GSS_C_ACCEPT 2 michael@0: michael@0: /* michael@0: * Status code types for gss_display_status michael@0: */ michael@0: #define GSS_C_GSS_CODE 1 michael@0: #define GSS_C_MECH_CODE 2 michael@0: michael@0: /* michael@0: * The constant definitions for channel-bindings address families michael@0: */ michael@0: #define GSS_C_AF_UNSPEC 0 michael@0: #define GSS_C_AF_LOCAL 1 michael@0: #define GSS_C_AF_INET 2 michael@0: #define GSS_C_AF_IMPLINK 3 michael@0: #define GSS_C_AF_PUP 4 michael@0: #define GSS_C_AF_CHAOS 5 michael@0: #define GSS_C_AF_NS 6 michael@0: #define GSS_C_AF_NBS 7 michael@0: #define GSS_C_AF_ECMA 8 michael@0: #define GSS_C_AF_DATAKIT 9 michael@0: #define GSS_C_AF_CCITT 10 michael@0: #define GSS_C_AF_SNA 11 michael@0: #define GSS_C_AF_DECnet 12 michael@0: #define GSS_C_AF_DLI 13 michael@0: #define GSS_C_AF_LAT 14 michael@0: #define GSS_C_AF_HYLINK 15 michael@0: #define GSS_C_AF_APPLETALK 16 michael@0: #define GSS_C_AF_BSC 17 michael@0: #define GSS_C_AF_DSS 18 michael@0: #define GSS_C_AF_OSI 19 michael@0: #define GSS_C_AF_X25 21 michael@0: michael@0: #define GSS_C_AF_NULLADDR 255 michael@0: michael@0: /* michael@0: * Various Null values michael@0: */ michael@0: #define GSS_C_NO_NAME ((gss_name_t) 0) michael@0: #define GSS_C_NO_BUFFER ((gss_buffer_t) 0) michael@0: #define GSS_C_NO_OID ((gss_OID) 0) michael@0: #define GSS_C_NO_OID_SET ((gss_OID_set) 0) michael@0: #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) michael@0: #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) michael@0: #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) michael@0: #define GSS_C_EMPTY_BUFFER {0, nullptr} michael@0: michael@0: /* michael@0: * Some alternate names for a couple of the above michael@0: * values. These are defined for V1 compatibility. michael@0: */ michael@0: #define GSS_C_NULL_OID GSS_C_NO_OID michael@0: #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET michael@0: michael@0: /* michael@0: * Define the default Quality of Protection for per-message michael@0: * services. Note that an implementation that offers multiple michael@0: * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero michael@0: * (as done here) to mean "default protection", or to a specific michael@0: * explicit QOP value. However, a value of 0 should always be michael@0: * interpreted by a GSSAPI implementation as a request for the michael@0: * default protection level. michael@0: */ michael@0: #define GSS_C_QOP_DEFAULT 0 michael@0: michael@0: /* michael@0: * Expiration time of 2^32-1 seconds means infinite lifetime for a michael@0: * credential or security context michael@0: */ michael@0: #define GSS_C_INDEFINITE 0xfffffffful michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" michael@0: * "\x01\x02\x01\x01"}, michael@0: * corresponding to an object-identifier value of michael@0: * {iso(1) member-body(2) United States(840) mit(113554) michael@0: * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant michael@0: * GSS_C_NT_USER_NAME should be initialized to point michael@0: * to that gss_OID_desc. michael@0: */ michael@0: extern gss_OID GSS_C_NT_USER_NAME; michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" michael@0: * "\x01\x02\x01\x02"}, michael@0: * corresponding to an object-identifier value of michael@0: * {iso(1) member-body(2) United States(840) mit(113554) michael@0: * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. michael@0: * The constant GSS_C_NT_MACHINE_UID_NAME should be michael@0: * initialized to point to that gss_OID_desc. michael@0: */ michael@0: extern gss_OID GSS_C_NT_MACHINE_UID_NAME; michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" michael@0: * "\x01\x02\x01\x03"}, michael@0: * corresponding to an object-identifier value of michael@0: * {iso(1) member-body(2) United States(840) mit(113554) michael@0: * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. michael@0: * The constant GSS_C_NT_STRING_UID_NAME should be michael@0: * initialized to point to that gss_OID_desc. michael@0: */ michael@0: extern gss_OID GSS_C_NT_STRING_UID_NAME; michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, michael@0: * corresponding to an object-identifier value of michael@0: * {iso(1) org(3) dod(6) internet(1) security(5) michael@0: * nametypes(6) gss-host-based-services(2)). The constant michael@0: * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point michael@0: * to that gss_OID_desc. This is a deprecated OID value, and michael@0: * implementations wishing to support hostbased-service names michael@0: * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, michael@0: * defined below, to identify such names; michael@0: * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym michael@0: * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input michael@0: * parameter, but should not be emitted by GSSAPI michael@0: * implementations michael@0: */ michael@0: extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X; michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" michael@0: * "\x01\x02\x01\x04"}, corresponding to an michael@0: * object-identifier value of {iso(1) member-body(2) michael@0: * Unites States(840) mit(113554) infosys(1) gssapi(2) michael@0: * generic(1) service_name(4)}. The constant michael@0: * GSS_C_NT_HOSTBASED_SERVICE should be initialized michael@0: * to point to that gss_OID_desc. michael@0: */ michael@0: extern gss_OID GSS_C_NT_HOSTBASED_SERVICE; michael@0: michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, michael@0: * corresponding to an object identifier value of michael@0: * {1(iso), 3(org), 6(dod), 1(internet), 5(security), michael@0: * 6(nametypes), 3(gss-anonymous-name)}. The constant michael@0: * and GSS_C_NT_ANONYMOUS should be initialized to point michael@0: * to that gss_OID_desc. michael@0: */ michael@0: extern gss_OID GSS_C_NT_ANONYMOUS; michael@0: michael@0: /* michael@0: * The implementation must reserve static storage for a michael@0: * gss_OID_desc object containing the value michael@0: * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, michael@0: * corresponding to an object-identifier value of michael@0: * {1(iso), 3(org), 6(dod), 1(internet), 5(security), michael@0: * 6(nametypes), 4(gss-api-exported-name)}. The constant michael@0: * GSS_C_NT_EXPORT_NAME should be initialized to point michael@0: * to that gss_OID_desc. michael@0: */ michael@0: extern gss_OID GSS_C_NT_EXPORT_NAME; michael@0: michael@0: /* Major status codes */ michael@0: michael@0: #define GSS_S_COMPLETE 0 michael@0: michael@0: /* michael@0: * Some "helper" definitions to make the status code macros obvious. michael@0: */ michael@0: #define GSS_C_CALLING_ERROR_OFFSET 24 michael@0: #define GSS_C_ROUTINE_ERROR_OFFSET 16 michael@0: #define GSS_C_SUPPLEMENTARY_OFFSET 0 michael@0: #define GSS_C_CALLING_ERROR_MASK 0377ul michael@0: #define GSS_C_ROUTINE_ERROR_MASK 0377ul michael@0: #define GSS_C_SUPPLEMENTARY_MASK 0177777ul michael@0: michael@0: /* michael@0: * The macros that test status codes for error conditions. michael@0: * Note that the GSS_ERROR() macro has changed slightly from michael@0: * the V1 GSSAPI so that it now evaluates its argument michael@0: * only once. michael@0: */ michael@0: #define GSS_CALLING_ERROR(x) \ michael@0: (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) michael@0: #define GSS_ROUTINE_ERROR(x) \ michael@0: (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) michael@0: #define GSS_SUPPLEMENTARY_INFO(x) \ michael@0: (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) michael@0: #define GSS_ERROR(x) \ michael@0: (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ michael@0: (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) michael@0: michael@0: /* michael@0: * Now the actual status code definitions michael@0: */ michael@0: michael@0: /* michael@0: * Calling errors: michael@0: */ michael@0: #define GSS_S_CALL_INACCESSIBLE_READ \ michael@0: (1ul << GSS_C_CALLING_ERROR_OFFSET) michael@0: #define GSS_S_CALL_INACCESSIBLE_WRITE \ michael@0: (2ul << GSS_C_CALLING_ERROR_OFFSET) michael@0: #define GSS_S_CALL_BAD_STRUCTURE \ michael@0: (3ul << GSS_C_CALLING_ERROR_OFFSET) michael@0: michael@0: /* michael@0: * Routine errors: michael@0: */ michael@0: #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_MIC GSS_S_BAD_SIG michael@0: #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET) michael@0: michael@0: /* michael@0: * Supplementary info bits: michael@0: */ michael@0: #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) michael@0: #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) michael@0: #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) michael@0: #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) michael@0: #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) michael@0: michael@0: /* michael@0: * Finally, function prototypes for the GSS-API routines. michael@0: */ michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_acquire_cred) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* desired_name */ michael@0: OM_uint32, /* time_req */ michael@0: const gss_OID_set, /* desired_mechs */ michael@0: gss_cred_usage_t, /* cred_usage */ michael@0: gss_cred_id_t *, /* output_cred_handle */ michael@0: gss_OID_set *, /* actual_mechs */ michael@0: OM_uint32 * /* time_rec */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_release_cred) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_cred_id_t * /* cred_handle */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_init_sec_context) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_cred_id_t, /* initiator_cred_handle */ michael@0: gss_ctx_id_t *, /* context_handle */ michael@0: const gss_name_t, /* target_name */ michael@0: const gss_OID, /* mech_type */ michael@0: OM_uint32, /* req_flags */ michael@0: OM_uint32, /* time_req */ michael@0: const gss_channel_bindings_t, /* input_chan_bindings */ michael@0: const gss_buffer_t, /* input_token */ michael@0: gss_OID *, /* actual_mech_type */ michael@0: gss_buffer_t, /* output_token */ michael@0: OM_uint32 *, /* ret_flags */ michael@0: OM_uint32 * /* time_rec */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_accept_sec_context) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t *, /* context_handle */ michael@0: const gss_cred_id_t, /* acceptor_cred_handle */ michael@0: const gss_buffer_t, /* input_token_buffer */ michael@0: const gss_channel_bindings_t, /* input_chan_bindings */ michael@0: gss_name_t *, /* src_name */ michael@0: gss_OID *, /* mech_type */ michael@0: gss_buffer_t, /* output_token */ michael@0: OM_uint32 *, /* ret_flags */ michael@0: OM_uint32 *, /* time_rec */ michael@0: gss_cred_id_t * /* delegated_cred_handle */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_process_context_token) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: const gss_buffer_t /* token_buffer */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_delete_sec_context) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t *, /* context_handle */ michael@0: gss_buffer_t /* output_token */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_context_time) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: OM_uint32 * /* time_rec */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_get_mic) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: gss_qop_t, /* qop_req */ michael@0: const gss_buffer_t, /* message_buffer */ michael@0: gss_buffer_t /* message_token */ michael@0: ); michael@0: michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_verify_mic) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: const gss_buffer_t, /* message_buffer */ michael@0: const gss_buffer_t, /* token_buffer */ michael@0: gss_qop_t * /* qop_state */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_wrap) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: int, /* conf_req_flag */ michael@0: gss_qop_t, /* qop_req */ michael@0: const gss_buffer_t, /* input_message_buffer */ michael@0: int *, /* conf_state */ michael@0: gss_buffer_t /* output_message_buffer */ michael@0: ); michael@0: michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_unwrap) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: const gss_buffer_t, /* input_message_buffer */ michael@0: gss_buffer_t, /* output_message_buffer */ michael@0: int *, /* conf_state */ michael@0: gss_qop_t * /* qop_state */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_display_status) michael@0: (OM_uint32 *, /* minor_status */ michael@0: OM_uint32, /* status_value */ michael@0: int, /* status_type */ michael@0: const gss_OID, /* mech_type */ michael@0: OM_uint32 *, /* message_context */ michael@0: gss_buffer_t /* status_string */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_indicate_mechs) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_OID_set * /* mech_set */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_compare_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* name1 */ michael@0: const gss_name_t, /* name2 */ michael@0: int * /* name_equal */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_display_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* input_name */ michael@0: gss_buffer_t, /* output_name_buffer */ michael@0: gss_OID * /* output_name_type */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_import_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_buffer_t, /* input_name_buffer */ michael@0: const gss_OID, /* input_name_type */ michael@0: gss_name_t * /* output_name */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_export_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* input_name */ michael@0: gss_buffer_t /* exported_name */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_release_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_name_t * /* input_name */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_release_buffer) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_buffer_t /* buffer */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_release_oid_set) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_OID_set * /* set */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_inquire_cred) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_cred_id_t, /* cred_handle */ michael@0: gss_name_t *, /* name */ michael@0: OM_uint32 *, /* lifetime */ michael@0: gss_cred_usage_t *, /* cred_usage */ michael@0: gss_OID_set * /* mechanisms */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_inquire_context) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: gss_name_t *, /* src_name */ michael@0: gss_name_t *, /* targ_name */ michael@0: OM_uint32 *, /* lifetime_rec */ michael@0: gss_OID *, /* mech_type */ michael@0: OM_uint32 *, /* ctx_flags */ michael@0: int *, /* locally_initiated */ michael@0: int * /* open */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_ctx_id_t, /* context_handle */ michael@0: int, /* conf_req_flag */ michael@0: gss_qop_t, /* qop_req */ michael@0: OM_uint32, /* req_output_size */ michael@0: OM_uint32 * /* max_input_size */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_add_cred) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_cred_id_t, /* input_cred_handle */ michael@0: const gss_name_t, /* desired_name */ michael@0: const gss_OID, /* desired_mech */ michael@0: gss_cred_usage_t, /* cred_usage */ michael@0: OM_uint32, /* initiator_time_req */ michael@0: OM_uint32, /* acceptor_time_req */ michael@0: gss_cred_id_t *, /* output_cred_handle */ michael@0: gss_OID_set *, /* actual_mechs */ michael@0: OM_uint32 *, /* initiator_time_rec */ michael@0: OM_uint32 * /* acceptor_time_rec */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_cred_id_t, /* cred_handle */ michael@0: const gss_OID, /* mech_type */ michael@0: gss_name_t *, /* name */ michael@0: OM_uint32 *, /* initiator_lifetime */ michael@0: OM_uint32 *, /* acceptor_lifetime */ michael@0: gss_cred_usage_t * /* cred_usage */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_export_sec_context) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t *, /* context_handle */ michael@0: gss_buffer_t /* interprocess_token */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_import_sec_context) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_buffer_t, /* interprocess_token */ michael@0: gss_ctx_id_t * /* context_handle */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_OID_set * /* oid_set */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_OID, /* member_oid */ michael@0: gss_OID_set * /* oid_set */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_OID, /* member */ michael@0: const gss_OID_set, /* set */ michael@0: int * /* present */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_OID, /* mechanism */ michael@0: gss_OID_set * /* name_types */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* input_name */ michael@0: gss_OID_set * /* mech_types */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_canonicalize_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* input_name */ michael@0: const gss_OID, /* mech_type */ michael@0: gss_name_t * /* output_name */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_duplicate_name) michael@0: (OM_uint32 *, /* minor_status */ michael@0: const gss_name_t, /* src_name */ michael@0: gss_name_t * /* dest_name */ michael@0: ); michael@0: michael@0: /* michael@0: * The following routines are obsolete variants of gss_get_mic, michael@0: * gss_verify_mic, gss_wrap and gss_unwrap. They should be michael@0: * provided by GSSAPI V2 implementations for backwards michael@0: * compatibility with V1 applications. Distinct entrypoints michael@0: * (as opposed to #defines) should be provided, both to allow michael@0: * GSSAPI V1 applications to link against GSSAPI V2 implementations, michael@0: * and to retain the slight parameter type differences between the michael@0: * obsolete versions of these routines and their current forms. michael@0: */ michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_sign) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t, /* context_handle */ michael@0: int, /* qop_req */ michael@0: gss_buffer_t, /* message_buffer */ michael@0: gss_buffer_t /* message_token */ michael@0: ); michael@0: michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_verify) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t, /* context_handle */ michael@0: gss_buffer_t, /* message_buffer */ michael@0: gss_buffer_t, /* token_buffer */ michael@0: int * /* qop_state */ michael@0: ); michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_seal) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t, /* context_handle */ michael@0: int, /* conf_req_flag */ michael@0: int, /* qop_req */ michael@0: gss_buffer_t, /* input_message_buffer */ michael@0: int *, /* conf_state */ michael@0: gss_buffer_t /* output_message_buffer */ michael@0: ); michael@0: michael@0: michael@0: GSS_MAKE_TYPEDEF michael@0: OM_uint32 michael@0: GSS_CALLCONV GSS_FUNC(gss_unseal) michael@0: (OM_uint32 *, /* minor_status */ michael@0: gss_ctx_id_t, /* context_handle */ michael@0: gss_buffer_t, /* input_message_buffer */ michael@0: gss_buffer_t, /* output_message_buffer */ michael@0: int *, /* conf_state */ michael@0: int * /* qop_state */ michael@0: ); michael@0: michael@0: michael@0: #if defined(XP_MACOSX) michael@0: # pragma pack(pop) michael@0: #endif michael@0: michael@0: EXTERN_C_END michael@0: michael@0: #endif /* GSSAPI_H_ */ michael@0: