1/* 2 * Copyright (c) 1997 - 2007 Kungliga Tekniska Högskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Portions Copyright (c) 2009 Apple Inc. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * 3. Neither the name of the Institute nor the names of its contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#ifndef GSSAPI_GSSAPI_H_ 37#define GSSAPI_GSSAPI_H_ 38 39/* 40 * First, include stddef.h to get size_t defined. 41 */ 42#include <stddef.h> 43 44#include <krb5-types.h> 45 46#ifndef BUILD_GSSAPI_LIB 47#if defined(_WIN32) 48#define GSSAPI_LIB_FUNCTION __declspec(dllimport) 49#define GSSAPI_LIB_CALL __stdcall 50#define GSSAPI_LIB_VARIABLE __declspec(dllimport) 51#else 52#define GSSAPI_LIB_FUNCTION 53#define GSSAPI_LIB_CALL 54#define GSSAPI_LIB_VARIABLE 55#endif 56#endif 57 58#ifdef __GSS_ITER_CRED_USES_CONST_OID 59#define gss_iter_OID gss_const_OID 60#else 61#define gss_iter_OID gss_OID 62#endif 63 64/* Compatiblity with MIT Kerberos on the Mac */ 65#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__)) 66#pragma pack(push,2) 67#endif 68 69 70#ifdef __cplusplus 71#define GSSAPI_CPP_START extern "C" { 72#define GSSAPI_CPP_END } 73#else 74#define GSSAPI_CPP_START 75#define GSSAPI_CPP_END 76#endif 77 78#ifdef _WIN32 79#define GSSAPI_CALLCONV __stdcall 80#else 81#define GSSAPI_CALLCONV 82#endif 83 84/* 85 * Now define the three implementation-dependent types. 86 */ 87 88typedef uint32_t OM_uint32; 89typedef uint64_t OM_uint64; 90 91typedef uint32_t gss_uint32; 92 93struct gss_name_t_desc_struct; 94typedef struct gss_name_t_desc_struct *gss_name_t; 95typedef const struct gss_name_t_desc_struct *gss_const_name_t; 96 97struct gss_ctx_id_t_desc_struct; 98typedef struct gss_ctx_id_t_desc_struct *gss_ctx_id_t; 99typedef const struct gss_ctx_id_t_desc_struct gss_const_ctx_id_t; 100 101typedef struct gss_OID_desc_struct { 102 OM_uint32 length; 103 void *elements; 104} gss_OID_desc, *gss_OID; 105typedef const gss_OID_desc * gss_const_OID; 106 107typedef struct gss_OID_set_desc_struct { 108 size_t count; 109 gss_OID elements; 110} gss_OID_set_desc, *gss_OID_set; 111typedef const gss_OID_set_desc * gss_const_OID_set; 112 113typedef int gss_cred_usage_t; 114 115struct gss_cred_id_t_desc_struct; 116typedef struct gss_cred_id_t_desc_struct *gss_cred_id_t; 117typedef const struct gss_cred_id_t_desc_struct *gss_const_cred_id_t; 118 119typedef struct gss_buffer_desc_struct { 120 size_t length; 121 void *value; 122} gss_buffer_desc, *gss_buffer_t; 123typedef const gss_buffer_desc * gss_const_buffer_t; 124 125typedef struct gss_channel_bindings_struct { 126 OM_uint32 initiator_addrtype; 127 gss_buffer_desc initiator_address; 128 OM_uint32 acceptor_addrtype; 129 gss_buffer_desc acceptor_address; 130 gss_buffer_desc application_data; 131} *gss_channel_bindings_t; 132typedef const struct gss_channel_bindings_struct *gss_const_channel_bindings_t; 133 134/* GGF extension data types */ 135typedef struct gss_buffer_set_desc_struct { 136 size_t count; 137 gss_buffer_desc *elements; 138} gss_buffer_set_desc, *gss_buffer_set_t; 139 140typedef struct gss_iov_buffer_desc_struct { 141 OM_uint32 type; 142 gss_buffer_desc buffer; 143} gss_iov_buffer_desc, *gss_iov_buffer_t; 144 145/* 146 * For now, define a QOP-type as an OM_uint32 147 */ 148typedef OM_uint32 gss_qop_t; 149 150/* XXX glue for old code */ 151typedef OM_uint32 *gss_status_id_t; 152typedef struct gss_auth_identity *gss_auth_identity_t; 153 154/* 155 * Flag bits for context-level services. 156 */ 157#define GSS_C_DELEG_FLAG 1 158#define GSS_C_MUTUAL_FLAG 2 159#define GSS_C_REPLAY_FLAG 4 160#define GSS_C_SEQUENCE_FLAG 8 161#define GSS_C_CONF_FLAG 16 162#define GSS_C_INTEG_FLAG 32 163#define GSS_C_ANON_FLAG 64 164#define GSS_C_PROT_READY_FLAG 128 165#define GSS_C_TRANS_FLAG 256 166 167#define GSS_C_DCE_STYLE 4096 168#define GSS_C_IDENTIFY_FLAG 8192 169#define GSS_C_EXTENDED_ERROR_FLAG 16384 170#define GSS_C_DELEG_POLICY_FLAG 32768 171 172/* 173 * Credential usage options 174 */ 175#define GSS_C_BOTH 0 176#define GSS_C_INITIATE 1 177#define GSS_C_ACCEPT 2 178 179#define GSS_C_OPTION_MASK 0xffff 180#define GSS_C_CRED_NO_UI 0x10000 181 182/* 183 * Status code types for gss_display_status 184 */ 185#define GSS_C_GSS_CODE 1 186#define GSS_C_MECH_CODE 2 187 188/* 189 * The constant definitions for channel-bindings address families 190 */ 191#define GSS_C_AF_UNSPEC 0 192#define GSS_C_AF_LOCAL 1 193#define GSS_C_AF_INET 2 194#define GSS_C_AF_IMPLINK 3 195#define GSS_C_AF_PUP 4 196#define GSS_C_AF_CHAOS 5 197#define GSS_C_AF_NS 6 198#define GSS_C_AF_NBS 7 199#define GSS_C_AF_ECMA 8 200#define GSS_C_AF_DATAKIT 9 201#define GSS_C_AF_CCITT 10 202#define GSS_C_AF_SNA 11 203#define GSS_C_AF_DECnet 12 204#define GSS_C_AF_DLI 13 205#define GSS_C_AF_LAT 14 206#define GSS_C_AF_HYLINK 15 207#define GSS_C_AF_APPLETALK 16 208#define GSS_C_AF_BSC 17 209#define GSS_C_AF_DSS 18 210#define GSS_C_AF_OSI 19 211#define GSS_C_AF_X25 21 212#define GSS_C_AF_INET6 24 213 214#define GSS_C_AF_NULLADDR 255 215 216/* 217 * Various Null values 218 */ 219#define GSS_C_NO_NAME ((gss_name_t) 0) 220#define GSS_C_NO_BUFFER ((gss_buffer_t) 0) 221#define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t) 0) 222#define GSS_C_NO_OID ((gss_OID) 0) 223#define GSS_C_NO_OID_SET ((gss_OID_set) 0) 224#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) 225#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) 226#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) 227#define GSS_C_EMPTY_BUFFER {0, NULL} 228#define GSS_C_NO_IOV_BUFFER ((gss_iov_buffer_t)0) 229 230/* 231 * Some alternate names for a couple of the above 232 * values. These are defined for V1 compatibility. 233 */ 234#define GSS_C_NULL_OID GSS_C_NO_OID 235#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET 236 237/* 238 * Define the default Quality of Protection for per-message 239 * services. Note that an implementation that offers multiple 240 * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero 241 * (as done here) to mean "default protection", or to a specific 242 * explicit QOP value. However, a value of 0 should always be 243 * interpreted by a GSSAPI implementation as a request for the 244 * default protection level. 245 */ 246#define GSS_C_QOP_DEFAULT 0 247 248#define GSS_KRB5_CONF_C_QOP_DES 0x0100 249#define GSS_KRB5_CONF_C_QOP_DES3_KD 0x0200 250 251/* 252 * Expiration time of 2^32-1 seconds means infinite lifetime for a 253 * credential or security context 254 */ 255#define GSS_C_INDEFINITE 0xfffffffful 256 257/* 258 * Type of gss_wrap_iov()/gss_unwrap_iov(). 259 */ 260 261#define GSS_IOV_BUFFER_TYPE_EMPTY 0 262#define GSS_IOV_BUFFER_TYPE_DATA 1 263#define GSS_IOV_BUFFER_TYPE_HEADER 2 264#define GSS_IOV_BUFFER_TYPE_MECH_PARAMS 3 265 266#define GSS_IOV_BUFFER_TYPE_TRAILER 7 267#define GSS_IOV_BUFFER_TYPE_PADDING 9 268#define GSS_IOV_BUFFER_TYPE_STREAM 10 269#define GSS_IOV_BUFFER_TYPE_SIGN_ONLY 11 270 271#define GSS_IOV_BUFFER_TYPE_FLAG_MASK 0xffff0000 272#define GSS_IOV_BUFFER_FLAG_ALLOCATE 0x00010000 273#define GSS_IOV_BUFFER_FLAG_ALLOCATED 0x00020000 274 275#define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE 0x00010000 /* old name */ 276#define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATED 0x00020000 /* old name */ 277 278#define GSS_IOV_BUFFER_TYPE(_t) ((_t) & ~GSS_IOV_BUFFER_TYPE_FLAG_MASK) 279#define GSS_IOV_BUFFER_FLAGS(_t) ((_t) & GSS_IOV_BUFFER_TYPE_FLAG_MASK) 280 281GSSAPI_CPP_START 282 283#ifndef __KRB5_H__ /* provide forward declaration if its not already defined */ 284struct krb5_ccache_data; /* for gss_krb5_copy_ccache, deprecated */ 285#endif 286 287#include <gssapi_oid.h> 288#include <gssapi_protos.h> 289 290/* 291 * The implementation must reserve static storage for a 292 * gss_OID_desc object containing the value 293 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 294 * "\x01\x02\x01\x01"}, 295 * corresponding to an object-identifier value of 296 * {iso(1) member-body(2) United States(840) mit(113554) 297 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant 298 * GSS_C_NT_USER_NAME should be initialized to point 299 * to that gss_OID_desc. 300 */ 301extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_user_name_oid_desc; 302#define GSS_C_NT_USER_NAME (&__gss_c_nt_user_name_oid_desc) 303 304/* 305 * The implementation must reserve static storage for a 306 * gss_OID_desc object containing the value 307 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 308 * "\x01\x02\x01\x02"}, 309 * corresponding to an object-identifier value of 310 * {iso(1) member-body(2) United States(840) mit(113554) 311 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. 312 * The constant GSS_C_NT_MACHINE_UID_NAME should be 313 * initialized to point to that gss_OID_desc. 314 */ 315extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_machine_uid_name_oid_desc; 316#define GSS_C_NT_MACHINE_UID_NAME (&__gss_c_nt_machine_uid_name_oid_desc) 317 318/* 319 * The implementation must reserve static storage for a 320 * gss_OID_desc object containing the value 321 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 322 * "\x01\x02\x01\x03"}, 323 * corresponding to an object-identifier value of 324 * {iso(1) member-body(2) United States(840) mit(113554) 325 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. 326 * The constant GSS_C_NT_STRING_UID_NAME should be 327 * initialized to point to that gss_OID_desc. 328 */ 329extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_string_uid_name_oid_desc; 330#define GSS_C_NT_STRING_UID_NAME (&__gss_c_nt_string_uid_name_oid_desc) 331 332/* 333 * The implementation must reserve static storage for a 334 * gss_OID_desc object containing the value 335 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, 336 * corresponding to an object-identifier value of 337 * {iso(1) org(3) dod(6) internet(1) security(5) 338 * nametypes(6) gss-host-based-services(2)). The constant 339 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point 340 * to that gss_OID_desc. This is a deprecated OID value, and 341 * implementations wishing to support hostbased-service names 342 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, 343 * defined below, to identify such names; 344 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym 345 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input 346 * parameter, but should not be emitted by GSS-API 347 * implementations 348 */ 349extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_x_oid_desc; 350#define GSS_C_NT_HOSTBASED_SERVICE_X (&__gss_c_nt_hostbased_service_x_oid_desc) 351 352/* 353 * The implementation must reserve static storage for a 354 * gss_OID_desc object containing the value 355 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 356 * "\x01\x02\x01\x04"}, corresponding to an 357 * object-identifier value of {iso(1) member-body(2) 358 * Unites States(840) mit(113554) infosys(1) gssapi(2) 359 * generic(1) service_name(4)}. The constant 360 * GSS_C_NT_HOSTBASED_SERVICE should be initialized 361 * to point to that gss_OID_desc. 362 */ 363extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_oid_desc; 364#define GSS_C_NT_HOSTBASED_SERVICE (&__gss_c_nt_hostbased_service_oid_desc) 365 366/* 367 * The implementation must reserve static storage for a 368 * gss_OID_desc object containing the value 369 * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, 370 * corresponding to an object identifier value of 371 * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 372 * 6(nametypes), 3(gss-anonymous-name)}. The constant 373 * and GSS_C_NT_ANONYMOUS should be initialized to point 374 * to that gss_OID_desc. 375 */ 376extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_anonymous_oid_desc; 377#define GSS_C_NT_ANONYMOUS (&__gss_c_nt_anonymous_oid_desc) 378 379/* 380 * The implementation must reserve static storage for a 381 * gss_OID_desc object containing the value 382 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, 383 * corresponding to an object-identifier value of 384 * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 385 * 6(nametypes), 4(gss-api-exported-name)}. The constant 386 * GSS_C_NT_EXPORT_NAME should be initialized to point 387 * to that gss_OID_desc. 388 */ 389extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_export_name_oid_desc; 390#define GSS_C_NT_EXPORT_NAME (&__gss_c_nt_export_name_oid_desc) 391 392/* 393 * Digest mechanism 394 */ 395 396extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_sasl_digest_md5_mechanism_oid_desc; 397#define GSS_SASL_DIGEST_MD5_MECHANISM (&__gss_sasl_digest_md5_mechanism_oid_desc) 398 399/* 400 * gss_inquire_sec_context_by_oid parameter for retrieving 401 * SSPI compatible session key. 402 */ 403extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_inq_sspi_session_key_oid_desc; 404#define GSS_C_INQ_SSPI_SESSION_KEY (&__gss_c_inq_sspi_session_key_oid_desc) 405 406/* 407 * gss_inquire_sec_context_by_oid parameter for retrieving 408 * the encoded Win2K PAC. Valid with both Kerberos and NTLM 409 * concrete mechanisms. 410 */ 411extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_inq_win2k_pac_x_oid_desc; 412#define GSS_C_INQ_WIN2K_PAC_X (&__gss_c_inq_win2k_pac_x_oid_desc) 413 414/* Major status codes */ 415 416#define GSS_S_COMPLETE 0 417 418/* 419 * Some "helper" definitions to make the status code macros obvious. 420 */ 421#define GSS_C_CALLING_ERROR_OFFSET 24 422#define GSS_C_ROUTINE_ERROR_OFFSET 16 423#define GSS_C_SUPPLEMENTARY_OFFSET 0 424#define GSS_C_CALLING_ERROR_MASK 0377ul 425#define GSS_C_ROUTINE_ERROR_MASK 0377ul 426#define GSS_C_SUPPLEMENTARY_MASK 0177777ul 427 428/* 429 * The macros that test status codes for error conditions. 430 * Note that the GSS_ERROR() macro has changed slightly from 431 * the V1 GSSAPI so that it now evaluates its argument 432 * only once. 433 */ 434#define GSS_CALLING_ERROR(x) \ 435 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) 436#define GSS_ROUTINE_ERROR(x) \ 437 (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) 438#define GSS_SUPPLEMENTARY_INFO(x) \ 439 (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) 440#define GSS_ERROR(x) \ 441 (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ 442 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) 443 444/* 445 * Now the actual status code definitions 446 */ 447 448/* 449 * Calling errors: 450 */ 451#define GSS_S_CALL_INACCESSIBLE_READ \ 452 (1ul << GSS_C_CALLING_ERROR_OFFSET) 453#define GSS_S_CALL_INACCESSIBLE_WRITE \ 454 (2ul << GSS_C_CALLING_ERROR_OFFSET) 455#define GSS_S_CALL_BAD_STRUCTURE \ 456 (3ul << GSS_C_CALLING_ERROR_OFFSET) 457 458/* 459 * Routine errors: 460 */ 461#define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET) 462#define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET) 463#define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET) 464 465#define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET) 466#define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET) 467#define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET) 468#define GSS_S_BAD_MIC GSS_S_BAD_SIG 469#define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET) 470#define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET) 471#define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET) 472#define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET) 473#define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET) 474#define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET) 475#define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET) 476#define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET) 477#define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET) 478#define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET) 479#define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET) 480#define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET) 481#define GSS_S_BAD_MECH_ATTR (19ul << GSS_C_ROUTINE_ERROR_OFFSET) 482 483/* 484 * Apparently awating spec fix. 485 */ 486#define GSS_S_CRED_UNAVAIL GSS_S_FAILURE 487 488/* 489 * Supplementary info bits: 490 */ 491#define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) 492#define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) 493#define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) 494#define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) 495#define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) 496 497/* gss_acquire_cred options mask hack */ 498#define GSS_C_OPTION_MASK 0xffff 499#define GSS_C_CRED_NO_UI 0x10000 500 501/* 502 * RFC 4401 - gss_pseudo_random 503 */ 504 505#define GSS_C_PRF_KEY_FULL 0 506#define GSS_C_PRF_KEY_PARTIAL 1 507 508extern GSSAPI_LIB_VARIABLE gss_buffer_desc __gss_c_attr_local_login_user; 509#define GSS_C_ATTR_LOCAL_LOGIN_USER (&__gss_c_attr_local_login_user) 510 511/* 512 * 513 */ 514 515#ifdef __APPLE__ 516 517#import <CoreFoundation/CoreFoundation.h> 518 519#define kGSSICPassword CFSTR("kGSSICPassword") 520#define kGSSICCertificate CFSTR("kGSSICCertificate") 521#define kGSSICVerifyCredential CFSTR("kGSSICVerifyCredential") 522 523#define kGSSCredentialUsage CFSTR("kGSSCredentialUsage") 524#define kGSS_C_INITIATE CFSTR("kGSS_C_INITIATE") 525#define kGSS_C_ACCEPT CFSTR("kGSS_C_ACCEPT") 526#define kGSS_C_BOTH CFSTR("kGSS_C_BOTH") 527 528#define kGSSICLKDCHostname CFSTR("kGSSICLKDCHostname") 529 530#define kGSSICKerberosCacheName CFSTR("kGSSICKerberosCacheName") 531#define kGSSICAppIdentifierACL CFSTR("kGSSICAppIdentifierACL") 532 533#include <gssapi_apple.h> 534 535 536#define kGSSChangePasswordOldPassword CFSTR("kGSSChangePasswordOldPassword") 537#define kGSSChangePasswordNewPassword CFSTR("kGSSChangePasswordNewPassword") 538 539#endif 540 541/* Include Apple private SPI */ 542#ifdef __GSSAPI_APPLE_API_PRIVATE 543#include <gssapi_spi.h> 544#endif 545 546GSSAPI_CPP_END 547 548#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__)) 549#pragma pack(pop) 550#endif 551 552#endif /* GSSAPI_GSSAPI_H_ */ 553