extensions/auth/gssapi.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/auth/gssapi.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,848 @@
     1.4 +/* vim:set ts=4 sw=4 sts=4 et cindent: */
     1.5 +/* ***** BEGIN LICENSE BLOCK *****
     1.6 + * Copyright 1993 by OpenVision Technologies, Inc.
     1.7 + * 
     1.8 + * Permission to use, copy, modify, distribute, and sell this software
     1.9 + * and its documentation for any purpose is hereby granted without fee,
    1.10 + * provided that the above copyright notice appears in all copies and
    1.11 + * that both that copyright notice and this permission notice appear in
    1.12 + * supporting documentation, and that the name of OpenVision not be used
    1.13 + * in advertising or publicity pertaining to distribution of the software
    1.14 + * without specific, written prior permission. OpenVision makes no
    1.15 + * representations about the suitability of this software for any
    1.16 + * purpose.  It is provided "as is" without express or implied warranty.
    1.17 + * 
    1.18 + * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
    1.19 + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
    1.20 + * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
    1.21 + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
    1.22 + * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    1.23 + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    1.24 + * PERFORMANCE OF THIS SOFTWARE.
    1.25 + ****** END LICENSE BLOCK ***** */
    1.26 +
    1.27 +#ifndef GSSAPI_H_
    1.28 +#define GSSAPI_H_
    1.29 +
    1.30 +/*
    1.31 + * Also define _GSSAPI_H_ as that is what the Kerberos 5 code defines and
    1.32 + * what header files on some systems look for.
    1.33 + */
    1.34 +#define _GSSAPI_H_
    1.35 +
    1.36 +/*
    1.37 + * On Mac OS X, Kerberos/Kerberos.h is used to gain access to certain
    1.38 + * system-specific Kerberos functions, but on 10.4, that file also brings
    1.39 + * in other headers that conflict with this one.
    1.40 + */
    1.41 +#define _GSSAPI_GENERIC_H_
    1.42 +#define _GSSAPI_KRB5_H_
    1.43 +
    1.44 +/* 
    1.45 + * Define windows specific needed parameters.
    1.46 + */
    1.47 +
    1.48 +#ifndef GSS_CALLCONV
    1.49 +#if defined(_WIN32)
    1.50 +#define GSS_CALLCONV __stdcall
    1.51 +#define GSS_CALLCONV_C __cdecl
    1.52 +#else
    1.53 +#define GSS_CALLCONV 
    1.54 +#define GSS_CALLCONV_C
    1.55 +#endif
    1.56 +#endif /* GSS_CALLCONV */
    1.57 +
    1.58 +#ifdef GSS_USE_FUNCTION_POINTERS
    1.59 +#ifdef _WIN32
    1.60 +#undef GSS_CALLCONV
    1.61 +#define GSS_CALLCONV
    1.62 +#define GSS_FUNC(f) (__stdcall *f##_type)
    1.63 +#else
    1.64 +#define GSS_FUNC(f) (*f##_type)
    1.65 +#endif
    1.66 +#define GSS_MAKE_TYPEDEF typedef
    1.67 +#else
    1.68 +#define GSS_FUNC(f) f
    1.69 +#define GSS_MAKE_TYPEDEF
    1.70 +#endif
    1.71 +
    1.72 +/*
    1.73 + * First, include stddef.h to get size_t defined.
    1.74 + */
    1.75 +#include <stddef.h>
    1.76 +
    1.77 +/*
    1.78 + * Configure set the following
    1.79 + */
    1.80 +
    1.81 +#ifndef SIZEOF_LONG
    1.82 +#undef SIZEOF_LONG 
    1.83 +#endif
    1.84 +#ifndef SIZEOF_SHORT
    1.85 +#undef SIZEOF_SHORT
    1.86 +#endif
    1.87 +
    1.88 +#ifndef EXTERN_C_BEGIN
    1.89 +#ifdef __cplusplus
    1.90 +#define EXTERN_C_BEGIN extern "C" {
    1.91 +#define EXTERN_C_END }
    1.92 +#else
    1.93 +#define EXTERN_C_BEGIN
    1.94 +#define EXTERN_C_END
    1.95 +#endif
    1.96 +#endif
    1.97 +
    1.98 +EXTERN_C_BEGIN
    1.99 +
   1.100 +#if defined(XP_MACOSX)
   1.101 +#    pragma pack(push,2)
   1.102 +#endif
   1.103 +
   1.104 +/*
   1.105 + * If the platform supports the xom.h header file, it should be
   1.106 + * included here.
   1.107 + */
   1.108 +/* #include <xom.h> */
   1.109 +
   1.110 +
   1.111 +/*
   1.112 + * Now define the three implementation-dependent types.
   1.113 + */
   1.114 +
   1.115 +typedef void * gss_name_t ;
   1.116 +typedef void * gss_ctx_id_t ;
   1.117 +typedef void * gss_cred_id_t ;
   1.118 + 
   1.119 +
   1.120 +/*
   1.121 + * The following type must be defined as the smallest natural
   1.122 + * unsigned integer supported by the platform that has at least
   1.123 + * 32 bits of precision.
   1.124 + */
   1.125 +
   1.126 +#if SIZEOF_LONG == 4
   1.127 +typedef unsigned long gss_uint32;
   1.128 +#elif SIZEOF_SHORT == 4
   1.129 +typedef unsigned short gss_uint32;
   1.130 +#else
   1.131 +typedef unsigned int gss_uint32;
   1.132 +#endif
   1.133 +
   1.134 +#ifdef OM_STRING
   1.135 +
   1.136 +/*
   1.137 + * We have included the xom.h header file.  Verify that OM_uint32
   1.138 + * is defined correctly.
   1.139 + */
   1.140 +
   1.141 +#if sizeof(gss_uint32) != sizeof(OM_uint32)
   1.142 +#error Incompatible definition of OM_uint32 from xom.h
   1.143 +#endif
   1.144 +
   1.145 +typedef OM_object_identifier gss_OID_desc, *gss_OID;
   1.146 +
   1.147 +#else /* !OM_STRING */
   1.148 +
   1.149 +/*
   1.150 + * We can't use X/Open definitions, so roll our own.               
   1.151 + */
   1.152 +typedef gss_uint32 OM_uint32;
   1.153 +typedef struct gss_OID_desc_struct {
   1.154 +  OM_uint32 length;
   1.155 +  void *elements;
   1.156 +} gss_OID_desc, *gss_OID;
   1.157 +
   1.158 +#endif /* !OM_STRING */
   1.159 +
   1.160 +typedef struct gss_OID_set_desc_struct  {
   1.161 +  size_t     count;
   1.162 +  gss_OID    elements;
   1.163 +} gss_OID_set_desc, *gss_OID_set;
   1.164 +
   1.165 +
   1.166 +/*
   1.167 + * For now, define a QOP-type as an OM_uint32
   1.168 + */
   1.169 +typedef OM_uint32 gss_qop_t;
   1.170 +
   1.171 +typedef int gss_cred_usage_t;
   1.172 +
   1.173 +
   1.174 +typedef struct gss_buffer_desc_struct {
   1.175 +  size_t length;
   1.176 +  void *value;
   1.177 +} gss_buffer_desc, *gss_buffer_t;
   1.178 +
   1.179 +typedef struct gss_channel_bindings_struct {
   1.180 +  OM_uint32 initiator_addrtype;
   1.181 +  gss_buffer_desc initiator_address;
   1.182 +  OM_uint32 acceptor_addrtype;
   1.183 +  gss_buffer_desc acceptor_address;
   1.184 +  gss_buffer_desc application_data;
   1.185 +} *gss_channel_bindings_t;
   1.186 +
   1.187 +
   1.188 +/*
   1.189 + * Flag bits for context-level services.
   1.190 + */
   1.191 +#define GSS_C_DELEG_FLAG 1
   1.192 +#define GSS_C_MUTUAL_FLAG 2
   1.193 +#define GSS_C_REPLAY_FLAG 4
   1.194 +#define GSS_C_SEQUENCE_FLAG 8
   1.195 +#define GSS_C_CONF_FLAG 16
   1.196 +#define GSS_C_INTEG_FLAG 32
   1.197 +#define GSS_C_ANON_FLAG 64
   1.198 +#define GSS_C_PROT_READY_FLAG 128
   1.199 +#define GSS_C_TRANS_FLAG 256
   1.200 +
   1.201 +/*
   1.202 + * Credential usage options
   1.203 + */
   1.204 +#define GSS_C_BOTH 0
   1.205 +#define GSS_C_INITIATE 1
   1.206 +#define GSS_C_ACCEPT 2
   1.207 +
   1.208 +/*
   1.209 + * Status code types for gss_display_status
   1.210 + */
   1.211 +#define GSS_C_GSS_CODE 1
   1.212 +#define GSS_C_MECH_CODE 2
   1.213 +
   1.214 +/*
   1.215 + * The constant definitions for channel-bindings address families
   1.216 + */
   1.217 +#define GSS_C_AF_UNSPEC     0
   1.218 +#define GSS_C_AF_LOCAL      1
   1.219 +#define GSS_C_AF_INET       2
   1.220 +#define GSS_C_AF_IMPLINK    3
   1.221 +#define GSS_C_AF_PUP        4
   1.222 +#define GSS_C_AF_CHAOS      5
   1.223 +#define GSS_C_AF_NS         6
   1.224 +#define GSS_C_AF_NBS        7
   1.225 +#define GSS_C_AF_ECMA       8
   1.226 +#define GSS_C_AF_DATAKIT    9
   1.227 +#define GSS_C_AF_CCITT      10
   1.228 +#define GSS_C_AF_SNA        11
   1.229 +#define GSS_C_AF_DECnet     12
   1.230 +#define GSS_C_AF_DLI        13
   1.231 +#define GSS_C_AF_LAT        14
   1.232 +#define GSS_C_AF_HYLINK     15
   1.233 +#define GSS_C_AF_APPLETALK  16
   1.234 +#define GSS_C_AF_BSC        17
   1.235 +#define GSS_C_AF_DSS        18
   1.236 +#define GSS_C_AF_OSI        19
   1.237 +#define GSS_C_AF_X25        21
   1.238 +
   1.239 +#define GSS_C_AF_NULLADDR   255
   1.240 +
   1.241 +/*
   1.242 + * Various Null values
   1.243 + */
   1.244 +#define GSS_C_NO_NAME ((gss_name_t) 0)
   1.245 +#define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
   1.246 +#define GSS_C_NO_OID ((gss_OID) 0)
   1.247 +#define GSS_C_NO_OID_SET ((gss_OID_set) 0)
   1.248 +#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
   1.249 +#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
   1.250 +#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
   1.251 +#define GSS_C_EMPTY_BUFFER {0, nullptr}
   1.252 +
   1.253 +/*
   1.254 + * Some alternate names for a couple of the above
   1.255 + * values.  These are defined for V1 compatibility.
   1.256 + */
   1.257 +#define GSS_C_NULL_OID GSS_C_NO_OID
   1.258 +#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
   1.259 +
   1.260 +/*
   1.261 + * Define the default Quality of Protection for per-message
   1.262 + * services.  Note that an implementation that offers multiple
   1.263 + * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
   1.264 + * (as done here) to mean "default protection", or to a specific
   1.265 + * explicit QOP value.  However, a value of 0 should always be
   1.266 + * interpreted by a GSSAPI implementation as a request for the
   1.267 + * default protection level.
   1.268 + */
   1.269 +#define GSS_C_QOP_DEFAULT 0
   1.270 +
   1.271 +/*
   1.272 + * Expiration time of 2^32-1 seconds means infinite lifetime for a
   1.273 + * credential or security context
   1.274 + */
   1.275 +#define GSS_C_INDEFINITE 0xfffffffful
   1.276 +
   1.277 +/*
   1.278 + * The implementation must reserve static storage for a
   1.279 + * gss_OID_desc object containing the value
   1.280 + * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
   1.281 + *              "\x01\x02\x01\x01"},
   1.282 + * corresponding to an object-identifier value of
   1.283 + * {iso(1) member-body(2) United States(840) mit(113554)
   1.284 + *  infosys(1) gssapi(2) generic(1) user_name(1)}.  The constant
   1.285 + * GSS_C_NT_USER_NAME should be initialized to point
   1.286 + * to that gss_OID_desc.
   1.287 + */
   1.288 +extern gss_OID GSS_C_NT_USER_NAME;
   1.289 +
   1.290 +/*
   1.291 + * The implementation must reserve static storage for a
   1.292 + * gss_OID_desc object containing the value
   1.293 + * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
   1.294 + *              "\x01\x02\x01\x02"},
   1.295 + * corresponding to an object-identifier value of
   1.296 + * {iso(1) member-body(2) United States(840) mit(113554)
   1.297 + *  infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
   1.298 + * The constant GSS_C_NT_MACHINE_UID_NAME should be
   1.299 + * initialized to point to that gss_OID_desc.
   1.300 + */
   1.301 +extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
   1.302 +
   1.303 +/*
   1.304 + * The implementation must reserve static storage for a
   1.305 + * gss_OID_desc object containing the value
   1.306 + * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
   1.307 + *              "\x01\x02\x01\x03"},
   1.308 + * corresponding to an object-identifier value of
   1.309 + * {iso(1) member-body(2) United States(840) mit(113554)
   1.310 + *  infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
   1.311 + * The constant GSS_C_NT_STRING_UID_NAME should be
   1.312 + * initialized to point to that gss_OID_desc.
   1.313 + */
   1.314 +extern gss_OID GSS_C_NT_STRING_UID_NAME;
   1.315 +
   1.316 +/*
   1.317 + * The implementation must reserve static storage for a
   1.318 + * gss_OID_desc object containing the value
   1.319 + * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
   1.320 + * corresponding to an object-identifier value of
   1.321 + * {iso(1) org(3) dod(6) internet(1) security(5)
   1.322 + * nametypes(6) gss-host-based-services(2)).  The constant
   1.323 + * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
   1.324 + * to that gss_OID_desc.  This is a deprecated OID value, and
   1.325 + * implementations wishing to support hostbased-service names
   1.326 + * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
   1.327 + * defined below, to identify such names; 
   1.328 + * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym 
   1.329 + * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
   1.330 + * parameter, but should not be emitted by GSSAPI 
   1.331 + * implementations
   1.332 + */
   1.333 +extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
   1.334 +
   1.335 +/*
   1.336 + * The implementation must reserve static storage for a
   1.337 + * gss_OID_desc object containing the value
   1.338 + * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
   1.339 + *              "\x01\x02\x01\x04"}, corresponding to an 
   1.340 + * object-identifier value of {iso(1) member-body(2) 
   1.341 + * Unites States(840) mit(113554) infosys(1) gssapi(2) 
   1.342 + * generic(1) service_name(4)}.  The constant
   1.343 + * GSS_C_NT_HOSTBASED_SERVICE should be initialized 
   1.344 + * to point to that gss_OID_desc.  
   1.345 + */
   1.346 +extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
   1.347 +
   1.348 +
   1.349 +/*
   1.350 + * The implementation must reserve static storage for a
   1.351 + * gss_OID_desc object containing the value
   1.352 + * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
   1.353 + * corresponding to an object identifier value of
   1.354 + * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
   1.355 + * 6(nametypes), 3(gss-anonymous-name)}.  The constant
   1.356 + * and GSS_C_NT_ANONYMOUS should be initialized to point
   1.357 + * to that gss_OID_desc.
   1.358 + */
   1.359 +extern gss_OID GSS_C_NT_ANONYMOUS;
   1.360 +
   1.361 +/*
   1.362 + * The implementation must reserve static storage for a
   1.363 + * gss_OID_desc object containing the value
   1.364 + * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
   1.365 + * corresponding to an object-identifier value of
   1.366 + * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
   1.367 + * 6(nametypes), 4(gss-api-exported-name)}.  The constant
   1.368 + * GSS_C_NT_EXPORT_NAME should be initialized to point
   1.369 + * to that gss_OID_desc.
   1.370 + */
   1.371 +extern gss_OID GSS_C_NT_EXPORT_NAME;
   1.372 +
   1.373 +/* Major status codes */
   1.374 +
   1.375 +#define GSS_S_COMPLETE 0
   1.376 +
   1.377 +/*
   1.378 + * Some "helper" definitions to make the status code macros obvious.
   1.379 + */
   1.380 +#define GSS_C_CALLING_ERROR_OFFSET 24
   1.381 +#define GSS_C_ROUTINE_ERROR_OFFSET 16
   1.382 +#define GSS_C_SUPPLEMENTARY_OFFSET 0
   1.383 +#define GSS_C_CALLING_ERROR_MASK 0377ul
   1.384 +#define GSS_C_ROUTINE_ERROR_MASK 0377ul
   1.385 +#define GSS_C_SUPPLEMENTARY_MASK 0177777ul
   1.386 +
   1.387 +/*
   1.388 + * The macros that test status codes for error conditions.
   1.389 + * Note that the GSS_ERROR() macro has changed slightly from
   1.390 + * the V1 GSSAPI so that it now evaluates its argument
   1.391 + * only once.
   1.392 + */
   1.393 +#define GSS_CALLING_ERROR(x) \
   1.394 +(x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
   1.395 +#define GSS_ROUTINE_ERROR(x) \
   1.396 +     (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
   1.397 +#define GSS_SUPPLEMENTARY_INFO(x) \
   1.398 +     (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
   1.399 +#define GSS_ERROR(x) \
   1.400 +     (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
   1.401 +           (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
   1.402 +
   1.403 +/*
   1.404 + * Now the actual status code definitions
   1.405 + */
   1.406 +
   1.407 +/*
   1.408 + * Calling errors:
   1.409 + */
   1.410 +#define GSS_S_CALL_INACCESSIBLE_READ \
   1.411 +     (1ul << GSS_C_CALLING_ERROR_OFFSET)
   1.412 +#define GSS_S_CALL_INACCESSIBLE_WRITE \
   1.413 +     (2ul << GSS_C_CALLING_ERROR_OFFSET)
   1.414 +#define GSS_S_CALL_BAD_STRUCTURE \
   1.415 +     (3ul << GSS_C_CALLING_ERROR_OFFSET)
   1.416 +
   1.417 +/*
   1.418 + * Routine errors:
   1.419 + */
   1.420 +#define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.421 +#define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.422 +#define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.423 +#define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.424 +#define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.425 +#define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.426 +#define GSS_S_BAD_MIC GSS_S_BAD_SIG
   1.427 +#define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.428 +#define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.429 +#define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.430 +#define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.431 +#define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.432 +#define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.433 +#define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.434 +#define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.435 +#define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.436 +#define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.437 +#define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.438 +#define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
   1.439 +
   1.440 +/*
   1.441 + * Supplementary info bits:
   1.442 + */
   1.443 +#define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
   1.444 +#define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
   1.445 +#define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
   1.446 +#define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
   1.447 +#define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
   1.448 +
   1.449 +/*
   1.450 + * Finally, function prototypes for the GSS-API routines.
   1.451 + */
   1.452 +
   1.453 +GSS_MAKE_TYPEDEF
   1.454 +OM_uint32 
   1.455 +GSS_CALLCONV GSS_FUNC(gss_acquire_cred)
   1.456 +(OM_uint32 *,             /*  minor_status */
   1.457 + const gss_name_t,        /* desired_name */
   1.458 + OM_uint32,               /* time_req */
   1.459 + const gss_OID_set,       /* desired_mechs */
   1.460 + gss_cred_usage_t,        /* cred_usage */
   1.461 + gss_cred_id_t *,         /* output_cred_handle */
   1.462 + gss_OID_set *,           /* actual_mechs */
   1.463 + OM_uint32 *              /* time_rec */
   1.464 + );
   1.465 +
   1.466 +GSS_MAKE_TYPEDEF
   1.467 +OM_uint32 
   1.468 +GSS_CALLCONV GSS_FUNC(gss_release_cred)
   1.469 +(OM_uint32 *,             /* minor_status */
   1.470 + gss_cred_id_t *          /* cred_handle */
   1.471 + );
   1.472 +
   1.473 +GSS_MAKE_TYPEDEF
   1.474 +OM_uint32 
   1.475 +GSS_CALLCONV GSS_FUNC(gss_init_sec_context)
   1.476 +(OM_uint32 *,             /* minor_status */
   1.477 + const gss_cred_id_t,     /* initiator_cred_handle */
   1.478 + gss_ctx_id_t *,          /* context_handle */
   1.479 + const gss_name_t,        /* target_name */
   1.480 + const gss_OID,           /* mech_type */
   1.481 + OM_uint32,               /* req_flags */
   1.482 + OM_uint32,               /* time_req */
   1.483 + const gss_channel_bindings_t, /* input_chan_bindings */
   1.484 + const gss_buffer_t,      /* input_token */
   1.485 + gss_OID *,               /* actual_mech_type */
   1.486 + gss_buffer_t,            /* output_token */
   1.487 + OM_uint32 *,             /* ret_flags */
   1.488 + OM_uint32 *              /* time_rec */
   1.489 + );
   1.490 +
   1.491 +GSS_MAKE_TYPEDEF
   1.492 +OM_uint32 
   1.493 +GSS_CALLCONV GSS_FUNC(gss_accept_sec_context)
   1.494 +(OM_uint32 *,             /* minor_status */
   1.495 + gss_ctx_id_t *,          /* context_handle */
   1.496 + const gss_cred_id_t,     /* acceptor_cred_handle */
   1.497 + const gss_buffer_t,      /* input_token_buffer */
   1.498 + const gss_channel_bindings_t, /* input_chan_bindings */
   1.499 + gss_name_t *,            /* src_name */
   1.500 + gss_OID *,               /* mech_type */
   1.501 + gss_buffer_t,            /* output_token */
   1.502 + OM_uint32 *,             /* ret_flags */
   1.503 + OM_uint32 *,             /* time_rec */
   1.504 + gss_cred_id_t *          /* delegated_cred_handle */
   1.505 +              );
   1.506 +
   1.507 +GSS_MAKE_TYPEDEF
   1.508 +OM_uint32 
   1.509 +GSS_CALLCONV GSS_FUNC(gss_process_context_token)
   1.510 +(OM_uint32 *,             /* minor_status */
   1.511 + const gss_ctx_id_t,      /* context_handle */
   1.512 + const gss_buffer_t       /* token_buffer */
   1.513 + );
   1.514 +
   1.515 +GSS_MAKE_TYPEDEF
   1.516 +OM_uint32 
   1.517 +GSS_CALLCONV GSS_FUNC(gss_delete_sec_context)
   1.518 +(OM_uint32 *,             /* minor_status */
   1.519 + gss_ctx_id_t *,          /* context_handle */
   1.520 + gss_buffer_t             /* output_token */
   1.521 + );
   1.522 +
   1.523 +GSS_MAKE_TYPEDEF
   1.524 +OM_uint32
   1.525 +GSS_CALLCONV GSS_FUNC(gss_context_time)
   1.526 +(OM_uint32 *,             /* minor_status */
   1.527 + const gss_ctx_id_t,      /* context_handle */
   1.528 + OM_uint32 *              /* time_rec */
   1.529 + );
   1.530 +
   1.531 +GSS_MAKE_TYPEDEF
   1.532 +OM_uint32 
   1.533 +GSS_CALLCONV GSS_FUNC(gss_get_mic)
   1.534 +(OM_uint32 *,             /* minor_status */
   1.535 + const gss_ctx_id_t,      /* context_handle */
   1.536 + gss_qop_t,               /* qop_req */
   1.537 + const gss_buffer_t,      /* message_buffer */
   1.538 + gss_buffer_t             /* message_token */
   1.539 + );
   1.540 +
   1.541 +
   1.542 +GSS_MAKE_TYPEDEF
   1.543 +OM_uint32 
   1.544 +GSS_CALLCONV GSS_FUNC(gss_verify_mic)
   1.545 +(OM_uint32 *,             /* minor_status */
   1.546 + const gss_ctx_id_t,      /* context_handle */
   1.547 + const gss_buffer_t,      /* message_buffer */
   1.548 + const gss_buffer_t,      /* token_buffer */
   1.549 + gss_qop_t *              /* qop_state */
   1.550 + );
   1.551 +
   1.552 +GSS_MAKE_TYPEDEF
   1.553 +OM_uint32 
   1.554 +GSS_CALLCONV GSS_FUNC(gss_wrap)
   1.555 +(OM_uint32 *,             /* minor_status */
   1.556 + const gss_ctx_id_t,      /* context_handle */
   1.557 + int,                     /* conf_req_flag */
   1.558 + gss_qop_t,               /* qop_req */
   1.559 + const gss_buffer_t,      /* input_message_buffer */
   1.560 + int *,                   /* conf_state */
   1.561 + gss_buffer_t             /* output_message_buffer */
   1.562 + );
   1.563 +
   1.564 +
   1.565 +GSS_MAKE_TYPEDEF
   1.566 +OM_uint32 
   1.567 +GSS_CALLCONV GSS_FUNC(gss_unwrap)
   1.568 +(OM_uint32 *,             /* minor_status */
   1.569 + const gss_ctx_id_t,      /* context_handle */
   1.570 + const gss_buffer_t,      /* input_message_buffer */
   1.571 + gss_buffer_t,            /* output_message_buffer */
   1.572 + int *,                   /* conf_state */
   1.573 + gss_qop_t *              /* qop_state */
   1.574 + );
   1.575 +
   1.576 +GSS_MAKE_TYPEDEF
   1.577 +OM_uint32 
   1.578 +GSS_CALLCONV GSS_FUNC(gss_display_status)
   1.579 +(OM_uint32 *,             /* minor_status */
   1.580 + OM_uint32,               /* status_value */
   1.581 + int,                     /* status_type */
   1.582 + const gss_OID,           /* mech_type */
   1.583 + OM_uint32 *,             /* message_context */
   1.584 + gss_buffer_t             /* status_string */
   1.585 + );
   1.586 +
   1.587 +GSS_MAKE_TYPEDEF
   1.588 +OM_uint32 
   1.589 +GSS_CALLCONV GSS_FUNC(gss_indicate_mechs)
   1.590 +(OM_uint32 *,             /* minor_status */
   1.591 + gss_OID_set *            /* mech_set */
   1.592 + );
   1.593 +
   1.594 +GSS_MAKE_TYPEDEF
   1.595 +OM_uint32 
   1.596 +GSS_CALLCONV GSS_FUNC(gss_compare_name)
   1.597 +(OM_uint32 *,             /* minor_status */
   1.598 + const gss_name_t,        /* name1 */
   1.599 + const gss_name_t,        /* name2 */
   1.600 + int *                    /* name_equal */
   1.601 + );
   1.602 +
   1.603 +GSS_MAKE_TYPEDEF
   1.604 +OM_uint32 
   1.605 +GSS_CALLCONV GSS_FUNC(gss_display_name)
   1.606 +(OM_uint32 *,             /* minor_status */
   1.607 + const gss_name_t,        /* input_name */
   1.608 + gss_buffer_t,            /* output_name_buffer */
   1.609 + gss_OID *                /* output_name_type */
   1.610 + );
   1.611 +
   1.612 +GSS_MAKE_TYPEDEF
   1.613 +OM_uint32 
   1.614 +GSS_CALLCONV GSS_FUNC(gss_import_name)
   1.615 +(OM_uint32 *,             /* minor_status */
   1.616 + const gss_buffer_t,      /* input_name_buffer */
   1.617 + const gss_OID,           /* input_name_type */
   1.618 + gss_name_t *             /* output_name */
   1.619 + );
   1.620 +
   1.621 +GSS_MAKE_TYPEDEF
   1.622 +OM_uint32 
   1.623 +GSS_CALLCONV GSS_FUNC(gss_export_name)
   1.624 +(OM_uint32  *,            /* minor_status */
   1.625 + const gss_name_t,        /* input_name */
   1.626 + gss_buffer_t             /* exported_name */
   1.627 + );
   1.628 +
   1.629 +GSS_MAKE_TYPEDEF
   1.630 +OM_uint32 
   1.631 +GSS_CALLCONV GSS_FUNC(gss_release_name)
   1.632 +(OM_uint32 *,             /* minor_status */
   1.633 + gss_name_t *             /* input_name */
   1.634 + );
   1.635 +
   1.636 +GSS_MAKE_TYPEDEF
   1.637 +OM_uint32 
   1.638 +GSS_CALLCONV GSS_FUNC(gss_release_buffer)
   1.639 +(OM_uint32 *,             /* minor_status */
   1.640 + gss_buffer_t             /* buffer */
   1.641 + );
   1.642 +
   1.643 +GSS_MAKE_TYPEDEF
   1.644 +OM_uint32 
   1.645 +GSS_CALLCONV GSS_FUNC(gss_release_oid_set)
   1.646 +(OM_uint32 *,             /* minor_status */
   1.647 + gss_OID_set *            /* set */
   1.648 + );
   1.649 +
   1.650 +GSS_MAKE_TYPEDEF
   1.651 +OM_uint32 
   1.652 +GSS_CALLCONV GSS_FUNC(gss_inquire_cred)
   1.653 +(OM_uint32 *,             /* minor_status */
   1.654 + const gss_cred_id_t,     /* cred_handle */
   1.655 + gss_name_t *,            /* name */
   1.656 + OM_uint32 *,             /* lifetime */
   1.657 + gss_cred_usage_t *,      /* cred_usage */
   1.658 + gss_OID_set *            /* mechanisms */
   1.659 + );
   1.660 +
   1.661 +GSS_MAKE_TYPEDEF
   1.662 +OM_uint32 
   1.663 +GSS_CALLCONV GSS_FUNC(gss_inquire_context)
   1.664 +(OM_uint32 *,             /* minor_status */
   1.665 + const gss_ctx_id_t,      /* context_handle */
   1.666 + gss_name_t *,            /* src_name */
   1.667 + gss_name_t *,            /* targ_name */
   1.668 + OM_uint32 *,             /* lifetime_rec */
   1.669 + gss_OID *,               /* mech_type */
   1.670 + OM_uint32 *,             /* ctx_flags */
   1.671 + int *,                   /* locally_initiated */
   1.672 + int *                    /* open */
   1.673 + );
   1.674 +
   1.675 +GSS_MAKE_TYPEDEF
   1.676 +OM_uint32 
   1.677 +GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit) 
   1.678 +(OM_uint32 *,             /* minor_status */
   1.679 + const gss_ctx_id_t,      /* context_handle */
   1.680 + int,                     /* conf_req_flag */
   1.681 + gss_qop_t,               /* qop_req */
   1.682 + OM_uint32,               /* req_output_size */
   1.683 + OM_uint32 *              /* max_input_size */
   1.684 + );
   1.685 +
   1.686 +GSS_MAKE_TYPEDEF
   1.687 +OM_uint32 
   1.688 +GSS_CALLCONV GSS_FUNC(gss_add_cred) 
   1.689 +(OM_uint32 *,             /* minor_status */
   1.690 + const gss_cred_id_t,     /* input_cred_handle */
   1.691 + const gss_name_t,        /* desired_name */
   1.692 + const gss_OID,           /* desired_mech */
   1.693 + gss_cred_usage_t,        /* cred_usage */
   1.694 + OM_uint32,               /* initiator_time_req */
   1.695 + OM_uint32,               /* acceptor_time_req */
   1.696 + gss_cred_id_t *,         /* output_cred_handle */
   1.697 + gss_OID_set *,           /* actual_mechs */
   1.698 + OM_uint32 *,             /* initiator_time_rec */
   1.699 + OM_uint32 *              /* acceptor_time_rec */
   1.700 + );
   1.701 +
   1.702 +GSS_MAKE_TYPEDEF
   1.703 +OM_uint32 
   1.704 +GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech) 
   1.705 +(OM_uint32 *,             /* minor_status */
   1.706 + const gss_cred_id_t,     /* cred_handle */
   1.707 + const gss_OID,           /* mech_type */
   1.708 + gss_name_t *,            /* name */
   1.709 + OM_uint32 *,             /* initiator_lifetime */
   1.710 + OM_uint32 *,             /* acceptor_lifetime */
   1.711 + gss_cred_usage_t *       /* cred_usage */
   1.712 + );
   1.713 +
   1.714 +GSS_MAKE_TYPEDEF
   1.715 +OM_uint32 
   1.716 +GSS_CALLCONV GSS_FUNC(gss_export_sec_context)
   1.717 +(OM_uint32 *,             /* minor_status */
   1.718 + gss_ctx_id_t *,          /* context_handle */
   1.719 + gss_buffer_t             /* interprocess_token */
   1.720 + );
   1.721 +
   1.722 +GSS_MAKE_TYPEDEF
   1.723 +OM_uint32 
   1.724 +GSS_CALLCONV GSS_FUNC(gss_import_sec_context)
   1.725 +(OM_uint32 *,             /* minor_status */
   1.726 + const gss_buffer_t,      /* interprocess_token */
   1.727 + gss_ctx_id_t *           /* context_handle */
   1.728 + );
   1.729 +
   1.730 +GSS_MAKE_TYPEDEF
   1.731 +OM_uint32 
   1.732 +GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set)
   1.733 +(OM_uint32 *,             /* minor_status */
   1.734 + gss_OID_set *            /* oid_set */
   1.735 + );
   1.736 +
   1.737 +GSS_MAKE_TYPEDEF
   1.738 +OM_uint32 
   1.739 +GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member)
   1.740 +(OM_uint32 *,             /* minor_status */
   1.741 + const gss_OID,           /* member_oid */
   1.742 + gss_OID_set *            /* oid_set */
   1.743 + );
   1.744 +
   1.745 +GSS_MAKE_TYPEDEF
   1.746 +OM_uint32 
   1.747 +GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member)
   1.748 +(OM_uint32 *,             /* minor_status */
   1.749 + const gss_OID,           /* member */
   1.750 + const gss_OID_set,       /* set */
   1.751 + int *                    /* present */
   1.752 + );
   1.753 +
   1.754 +GSS_MAKE_TYPEDEF
   1.755 +OM_uint32 
   1.756 +GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech)
   1.757 +(OM_uint32 *,             /* minor_status */
   1.758 + const gss_OID,           /* mechanism */
   1.759 + gss_OID_set *            /* name_types */
   1.760 + );
   1.761 +
   1.762 +GSS_MAKE_TYPEDEF
   1.763 +OM_uint32 
   1.764 +GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name)
   1.765 +(OM_uint32 *,             /* minor_status */
   1.766 + const gss_name_t,        /* input_name */
   1.767 + gss_OID_set *            /* mech_types */
   1.768 + );
   1.769 +
   1.770 +GSS_MAKE_TYPEDEF
   1.771 +OM_uint32 
   1.772 +GSS_CALLCONV GSS_FUNC(gss_canonicalize_name)
   1.773 +(OM_uint32 *,             /* minor_status */
   1.774 + const gss_name_t,        /* input_name */
   1.775 + const gss_OID,           /* mech_type */
   1.776 + gss_name_t *             /* output_name */
   1.777 + );
   1.778 +
   1.779 +GSS_MAKE_TYPEDEF
   1.780 +OM_uint32 
   1.781 +GSS_CALLCONV GSS_FUNC(gss_duplicate_name)
   1.782 +(OM_uint32 *,             /* minor_status */
   1.783 + const gss_name_t,        /* src_name */
   1.784 + gss_name_t *             /* dest_name */
   1.785 + );
   1.786 +
   1.787 +   /*
   1.788 +    * The following routines are obsolete variants of gss_get_mic,
   1.789 +    * gss_verify_mic, gss_wrap and gss_unwrap.  They should be
   1.790 +    * provided by GSSAPI V2 implementations for backwards
   1.791 +    * compatibility with V1 applications.  Distinct entrypoints
   1.792 +    * (as opposed to #defines) should be provided, both to allow
   1.793 +    * GSSAPI V1 applications to link against GSSAPI V2 implementations,
   1.794 +    * and to retain the slight parameter type differences between the
   1.795 +    * obsolete versions of these routines and their current forms.
   1.796 +    */
   1.797 +
   1.798 +   GSS_MAKE_TYPEDEF
   1.799 +   OM_uint32 
   1.800 +   GSS_CALLCONV GSS_FUNC(gss_sign)
   1.801 +              (OM_uint32 *,        /* minor_status */
   1.802 +               gss_ctx_id_t,       /* context_handle */
   1.803 +               int,                /* qop_req */
   1.804 +               gss_buffer_t,       /* message_buffer */
   1.805 +               gss_buffer_t        /* message_token */
   1.806 +              );
   1.807 +
   1.808 +
   1.809 +   GSS_MAKE_TYPEDEF
   1.810 +   OM_uint32 
   1.811 +   GSS_CALLCONV GSS_FUNC(gss_verify)
   1.812 +              (OM_uint32 *,        /* minor_status */
   1.813 +               gss_ctx_id_t,       /* context_handle */
   1.814 +               gss_buffer_t,       /* message_buffer */
   1.815 +               gss_buffer_t,       /* token_buffer */
   1.816 +               int *               /* qop_state */
   1.817 +              );
   1.818 +
   1.819 +   GSS_MAKE_TYPEDEF
   1.820 +   OM_uint32
   1.821 +   GSS_CALLCONV GSS_FUNC(gss_seal)
   1.822 +              (OM_uint32 *,        /* minor_status */
   1.823 +               gss_ctx_id_t,       /* context_handle */
   1.824 +               int,                /* conf_req_flag */
   1.825 +               int,                /* qop_req */
   1.826 +               gss_buffer_t,       /* input_message_buffer */
   1.827 +               int *,              /* conf_state */
   1.828 +               gss_buffer_t        /* output_message_buffer */
   1.829 +              );
   1.830 +
   1.831 +
   1.832 +   GSS_MAKE_TYPEDEF
   1.833 +   OM_uint32 
   1.834 +   GSS_CALLCONV GSS_FUNC(gss_unseal)
   1.835 +              (OM_uint32 *,        /* minor_status */
   1.836 +               gss_ctx_id_t,       /* context_handle */
   1.837 +               gss_buffer_t,       /* input_message_buffer */
   1.838 +               gss_buffer_t,       /* output_message_buffer */
   1.839 +               int *,              /* conf_state */
   1.840 +               int *               /* qop_state */
   1.841 +              );
   1.842 +
   1.843 +
   1.844 +#if defined(XP_MACOSX)
   1.845 +#    pragma pack(pop)
   1.846 +#endif
   1.847 +
   1.848 +EXTERN_C_END
   1.849 +
   1.850 +#endif /* GSSAPI_H_ */
   1.851 +

mercurial