1 /* 2 * Copyright (c) 1997 - 2007 Kungliga Tekniska Högskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 17 * 3. Neither the name of the Institute nor the names of its contributors 18 * may be used to endorse or promote products derived from this software 19 * without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34 #ifndef GSSAPI_GSSAPI_H_ 35 #define GSSAPI_GSSAPI_H_ 36 37 /* 38 * First, include stddef.h to get size_t defined. 39 */ 40 #include <stddef.h> 41 42 #include <krb5-types.h> 43 44 #ifndef BUILD_GSSAPI_LIB 45 #if defined(_WIN32) 46 #define GSSAPI_LIB_FUNCTION __declspec(dllimport) 47 #define GSSAPI_LIB_CALL __stdcall 48 #define GSSAPI_LIB_VARIABLE __declspec(dllimport) 49 #else 50 #define GSSAPI_LIB_FUNCTION 51 #define GSSAPI_LIB_CALL 52 #define GSSAPI_LIB_VARIABLE 53 #endif 54 #endif 55 56 #ifndef GSSAPI_DEPRECATED_FUNCTION 57 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) 58 #define GSSAPI_DEPRECATED_FUNCTION(X) __attribute__((deprecated)) 59 #else 60 #define GSSAPI_DEPRECATED_FUNCTION(X) 61 #endif 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 #ifdef __cplusplus 70 #define GSSAPI_CPP_START extern "C" { 71 #define GSSAPI_CPP_END } 72 #else 73 #define GSSAPI_CPP_START 74 #define GSSAPI_CPP_END 75 #endif 76 77 #ifdef _WIN32 78 #define GSSAPI_CALLCONV __stdcall 79 #else 80 #define GSSAPI_CALLCONV 81 #endif 82 83 /* 84 * Now define the three implementation-dependent types. 85 */ 86 87 typedef uint32_t OM_uint32; 88 typedef uint64_t OM_uint64; 89 90 typedef uint32_t gss_uint32; 91 92 struct gss_name_t_desc_struct; 93 typedef struct gss_name_t_desc_struct *gss_name_t; 94 typedef const struct gss_name_t_desc_struct *gss_const_name_t; 95 96 struct gss_ctx_id_t_desc_struct; 97 typedef struct gss_ctx_id_t_desc_struct *gss_ctx_id_t; 98 typedef const struct gss_ctx_id_t_desc_struct gss_const_ctx_id_t; 99 100 typedef struct gss_OID_desc_struct { 101 OM_uint32 length; 102 void *elements; 103 } gss_OID_desc, *gss_OID; 104 typedef const gss_OID_desc * gss_const_OID; 105 106 typedef struct gss_OID_set_desc_struct { 107 size_t count; 108 gss_OID elements; 109 } gss_OID_set_desc, *gss_OID_set; 110 typedef const gss_OID_set_desc * gss_const_OID_set; 111 112 typedef int gss_cred_usage_t; 113 114 struct gss_cred_id_t_desc_struct; 115 typedef struct gss_cred_id_t_desc_struct *gss_cred_id_t; 116 typedef const struct gss_cred_id_t_desc_struct *gss_const_cred_id_t; 117 118 typedef struct gss_buffer_desc_struct { 119 size_t length; 120 void *value; 121 } gss_buffer_desc, *gss_buffer_t; 122 typedef const gss_buffer_desc * gss_const_buffer_t; 123 124 typedef struct gss_channel_bindings_struct { 125 OM_uint32 initiator_addrtype; 126 gss_buffer_desc initiator_address; 127 OM_uint32 acceptor_addrtype; 128 gss_buffer_desc acceptor_address; 129 gss_buffer_desc application_data; 130 } *gss_channel_bindings_t; 131 typedef const struct gss_channel_bindings_struct *gss_const_channel_bindings_t; 132 133 /* GGF extension data types */ 134 typedef struct gss_buffer_set_desc_struct { 135 size_t count; 136 gss_buffer_desc *elements; 137 } gss_buffer_set_desc, *gss_buffer_set_t; 138 139 typedef struct gss_iov_buffer_desc_struct { 140 OM_uint32 type; 141 gss_buffer_desc buffer; 142 } gss_iov_buffer_desc, *gss_iov_buffer_t; 143 144 /* 145 * For now, define a QOP-type as an OM_uint32 146 */ 147 typedef OM_uint32 gss_qop_t; 148 149 150 151 /* 152 * Flag bits for context-level services. 153 */ 154 #define GSS_C_DELEG_FLAG 1 155 #define GSS_C_MUTUAL_FLAG 2 156 #define GSS_C_REPLAY_FLAG 4 157 #define GSS_C_SEQUENCE_FLAG 8 158 #define GSS_C_CONF_FLAG 16 159 #define GSS_C_INTEG_FLAG 32 160 #define GSS_C_ANON_FLAG 64 161 #define GSS_C_PROT_READY_FLAG 128 162 #define GSS_C_TRANS_FLAG 256 163 164 #define GSS_C_DCE_STYLE 4096 165 #define GSS_C_IDENTIFY_FLAG 8192 166 #define GSS_C_EXTENDED_ERROR_FLAG 16384 167 #define GSS_C_DELEG_POLICY_FLAG 32768 168 169 /* 170 * Credential usage options 171 */ 172 #define GSS_C_BOTH 0 173 #define GSS_C_INITIATE 1 174 #define GSS_C_ACCEPT 2 175 176 /* 177 * Status code types for gss_display_status 178 */ 179 #define GSS_C_GSS_CODE 1 180 #define GSS_C_MECH_CODE 2 181 182 /* 183 * The constant definitions for channel-bindings address families 184 */ 185 #define GSS_C_AF_UNSPEC 0 186 #define GSS_C_AF_LOCAL 1 187 #define GSS_C_AF_INET 2 188 #define GSS_C_AF_IMPLINK 3 189 #define GSS_C_AF_PUP 4 190 #define GSS_C_AF_CHAOS 5 191 #define GSS_C_AF_NS 6 192 #define GSS_C_AF_NBS 7 193 #define GSS_C_AF_ECMA 8 194 #define GSS_C_AF_DATAKIT 9 195 #define GSS_C_AF_CCITT 10 196 #define GSS_C_AF_SNA 11 197 #define GSS_C_AF_DECnet 12 198 #define GSS_C_AF_DLI 13 199 #define GSS_C_AF_LAT 14 200 #define GSS_C_AF_HYLINK 15 201 #define GSS_C_AF_APPLETALK 16 202 #define GSS_C_AF_BSC 17 203 #define GSS_C_AF_DSS 18 204 #define GSS_C_AF_OSI 19 205 #define GSS_C_AF_X25 21 206 #define GSS_C_AF_INET6 24 207 208 #define GSS_C_AF_NULLADDR 255 209 210 /* 211 * Various Null values 212 */ 213 #define GSS_C_NO_NAME ((gss_name_t) 0) 214 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0) 215 #define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t) 0) 216 #define GSS_C_NO_OID ((gss_OID) 0) 217 #define GSS_C_NO_OID_SET ((gss_OID_set) 0) 218 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) 219 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) 220 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) 221 #define GSS_C_EMPTY_BUFFER {0, NULL} 222 #define GSS_C_NO_IOV_BUFFER ((gss_iov_buffer_t)0) 223 224 /* 225 * Some alternate names for a couple of the above 226 * values. These are defined for V1 compatibility. 227 */ 228 #define GSS_C_NULL_OID GSS_C_NO_OID 229 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET 230 231 /* 232 * Define the default Quality of Protection for per-message 233 * services. Note that an implementation that offers multiple 234 * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero 235 * (as done here) to mean "default protection", or to a specific 236 * explicit QOP value. However, a value of 0 should always be 237 * interpreted by a GSSAPI implementation as a request for the 238 * default protection level. 239 */ 240 #define GSS_C_QOP_DEFAULT 0 241 242 #define GSS_KRB5_CONF_C_QOP_DES 0x0100 243 #define GSS_KRB5_CONF_C_QOP_DES3_KD 0x0200 244 245 /* 246 * Expiration time of 2^32-1 seconds means infinite lifetime for a 247 * credential or security context 248 */ 249 #define GSS_C_INDEFINITE 0xfffffffful 250 251 /* 252 * Type of gss_wrap_iov()/gss_unwrap_iov(). 253 */ 254 255 #define GSS_IOV_BUFFER_TYPE_EMPTY 0 256 #define GSS_IOV_BUFFER_TYPE_DATA 1 257 #define GSS_IOV_BUFFER_TYPE_HEADER 2 258 #define GSS_IOV_BUFFER_TYPE_MECH_PARAMS 3 259 260 #define GSS_IOV_BUFFER_TYPE_TRAILER 7 261 #define GSS_IOV_BUFFER_TYPE_PADDING 9 262 #define GSS_IOV_BUFFER_TYPE_STREAM 10 263 #define GSS_IOV_BUFFER_TYPE_SIGN_ONLY 11 264 265 #define GSS_IOV_BUFFER_TYPE_FLAG_MASK 0xffff0000 266 #define GSS_IOV_BUFFER_FLAG_ALLOCATE 0x00010000 267 #define GSS_IOV_BUFFER_FLAG_ALLOCATED 0x00020000 268 269 #define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE 0x00010000 /* old name */ 270 #define GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATED 0x00020000 /* old name */ 271 272 #define GSS_IOV_BUFFER_TYPE(_t) ((_t) & ~GSS_IOV_BUFFER_TYPE_FLAG_MASK) 273 #define GSS_IOV_BUFFER_FLAGS(_t) ((_t) & GSS_IOV_BUFFER_TYPE_FLAG_MASK) 274 275 GSSAPI_CPP_START 276 277 #include <gssapi/gssapi_oid.h> 278 279 /* 280 * The implementation must reserve static storage for a 281 * gss_OID_desc object containing the value 282 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 283 * "\x01\x02\x01\x01"}, 284 * corresponding to an object-identifier value of 285 * {iso(1) member-body(2) United States(840) mit(113554) 286 * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant 287 * GSS_C_NT_USER_NAME should be initialized to point 288 * to that gss_OID_desc. 289 */ 290 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_user_name_oid_desc; 291 #define GSS_C_NT_USER_NAME (&__gss_c_nt_user_name_oid_desc) 292 293 /* 294 * The implementation must reserve static storage for a 295 * gss_OID_desc object containing the value 296 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 297 * "\x01\x02\x01\x02"}, 298 * corresponding to an object-identifier value of 299 * {iso(1) member-body(2) United States(840) mit(113554) 300 * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. 301 * The constant GSS_C_NT_MACHINE_UID_NAME should be 302 * initialized to point to that gss_OID_desc. 303 */ 304 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_machine_uid_name_oid_desc; 305 #define GSS_C_NT_MACHINE_UID_NAME (&__gss_c_nt_machine_uid_name_oid_desc) 306 307 /* 308 * The implementation must reserve static storage for a 309 * gss_OID_desc object containing the value 310 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 311 * "\x01\x02\x01\x03"}, 312 * corresponding to an object-identifier value of 313 * {iso(1) member-body(2) United States(840) mit(113554) 314 * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. 315 * The constant GSS_C_NT_STRING_UID_NAME should be 316 * initialized to point to that gss_OID_desc. 317 */ 318 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_string_uid_name_oid_desc; 319 #define GSS_C_NT_STRING_UID_NAME (&__gss_c_nt_string_uid_name_oid_desc) 320 321 /* 322 * The implementation must reserve static storage for a 323 * gss_OID_desc object containing the value 324 * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, 325 * corresponding to an object-identifier value of 326 * {iso(1) org(3) dod(6) internet(1) security(5) 327 * nametypes(6) gss-host-based-services(2)). The constant 328 * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point 329 * to that gss_OID_desc. This is a deprecated OID value, and 330 * implementations wishing to support hostbased-service names 331 * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, 332 * defined below, to identify such names; 333 * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym 334 * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input 335 * parameter, but should not be emitted by GSS-API 336 * implementations 337 */ 338 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_x_oid_desc; 339 #define GSS_C_NT_HOSTBASED_SERVICE_X (&__gss_c_nt_hostbased_service_x_oid_desc) 340 341 /* 342 * The implementation must reserve static storage for a 343 * gss_OID_desc object containing the value 344 * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 345 * "\x01\x02\x01\x04"}, corresponding to an 346 * object-identifier value of {iso(1) member-body(2) 347 * Unites States(840) mit(113554) infosys(1) gssapi(2) 348 * generic(1) service_name(4)}. The constant 349 * GSS_C_NT_HOSTBASED_SERVICE should be initialized 350 * to point to that gss_OID_desc. 351 */ 352 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_hostbased_service_oid_desc; 353 #define GSS_C_NT_HOSTBASED_SERVICE (&__gss_c_nt_hostbased_service_oid_desc) 354 355 /* 356 * The implementation must reserve static storage for a 357 * gss_OID_desc object containing the value 358 * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, 359 * corresponding to an object identifier value of 360 * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 361 * 6(nametypes), 3(gss-anonymous-name)}. The constant 362 * and GSS_C_NT_ANONYMOUS should be initialized to point 363 * to that gss_OID_desc. 364 */ 365 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_anonymous_oid_desc; 366 #define GSS_C_NT_ANONYMOUS (&__gss_c_nt_anonymous_oid_desc) 367 368 /* 369 * The implementation must reserve static storage for a 370 * gss_OID_desc object containing the value 371 * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, 372 * corresponding to an object-identifier value of 373 * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 374 * 6(nametypes), 4(gss-api-exported-name)}. The constant 375 * GSS_C_NT_EXPORT_NAME should be initialized to point 376 * to that gss_OID_desc. 377 */ 378 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_c_nt_export_name_oid_desc; 379 #define GSS_C_NT_EXPORT_NAME (&__gss_c_nt_export_name_oid_desc) 380 381 /* Major status codes */ 382 383 #define GSS_S_COMPLETE 0 384 385 /* 386 * Some "helper" definitions to make the status code macros obvious. 387 */ 388 #define GSS_C_CALLING_ERROR_OFFSET 24 389 #define GSS_C_ROUTINE_ERROR_OFFSET 16 390 #define GSS_C_SUPPLEMENTARY_OFFSET 0 391 #define GSS_C_CALLING_ERROR_MASK 0377ul 392 #define GSS_C_ROUTINE_ERROR_MASK 0377ul 393 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul 394 395 /* 396 * The macros that test status codes for error conditions. 397 * Note that the GSS_ERROR() macro has changed slightly from 398 * the V1 GSSAPI so that it now evaluates its argument 399 * only once. 400 */ 401 #define GSS_CALLING_ERROR(x) \ 402 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) 403 #define GSS_ROUTINE_ERROR(x) \ 404 (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) 405 #define GSS_SUPPLEMENTARY_INFO(x) \ 406 (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) 407 #define GSS_ERROR(x) \ 408 (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ 409 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) 410 411 /* 412 * Now the actual status code definitions 413 */ 414 415 /* 416 * Calling errors: 417 */ 418 #define GSS_S_CALL_INACCESSIBLE_READ \ 419 (1ul << GSS_C_CALLING_ERROR_OFFSET) 420 #define GSS_S_CALL_INACCESSIBLE_WRITE \ 421 (2ul << GSS_C_CALLING_ERROR_OFFSET) 422 #define GSS_S_CALL_BAD_STRUCTURE \ 423 (3ul << GSS_C_CALLING_ERROR_OFFSET) 424 425 /* 426 * Routine errors: 427 */ 428 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET) 429 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET) 430 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET) 431 432 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET) 433 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET) 434 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET) 435 #define GSS_S_BAD_MIC GSS_S_BAD_SIG 436 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET) 437 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET) 438 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET) 439 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET) 440 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET) 441 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET) 442 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET) 443 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET) 444 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET) 445 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET) 446 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET) 447 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET) 448 #define GSS_S_BAD_MECH_ATTR (19ul << GSS_C_ROUTINE_ERROR_OFFSET) 449 450 /* 451 * Apparently awating spec fix. 452 */ 453 #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE 454 455 /* 456 * Supplementary info bits: 457 */ 458 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) 459 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) 460 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) 461 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) 462 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) 463 464 /* 465 * Finally, function prototypes for the GSS-API routines. 466 */ 467 468 #define GSS_C_OPTION_MASK 0xffff 469 #define GSS_C_CRED_NO_UI 0x10000 470 471 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred 472 (OM_uint32 * /*minor_status*/, 473 const gss_name_t /*desired_name*/, 474 OM_uint32 /*time_req*/, 475 const gss_OID_set /*desired_mechs*/, 476 gss_cred_usage_t /*cred_usage*/, 477 gss_cred_id_t * /*output_cred_handle*/, 478 gss_OID_set * /*actual_mechs*/, 479 OM_uint32 * /*time_rec*/ 480 ); 481 482 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred 483 (OM_uint32 * /*minor_status*/, 484 gss_cred_id_t * /*cred_handle*/ 485 ); 486 487 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context 488 (OM_uint32 * /*minor_status*/, 489 const gss_cred_id_t /*initiator_cred_handle*/, 490 gss_ctx_id_t * /*context_handle*/, 491 const gss_name_t /*target_name*/, 492 const gss_OID /*mech_type*/, 493 OM_uint32 /*req_flags*/, 494 OM_uint32 /*time_req*/, 495 const gss_channel_bindings_t /*input_chan_bindings*/, 496 const gss_buffer_t /*input_token*/, 497 gss_OID * /*actual_mech_type*/, 498 gss_buffer_t /*output_token*/, 499 OM_uint32 * /*ret_flags*/, 500 OM_uint32 * /*time_rec*/ 501 ); 502 503 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_accept_sec_context 504 (OM_uint32 * /*minor_status*/, 505 gss_ctx_id_t * /*context_handle*/, 506 const gss_cred_id_t /*acceptor_cred_handle*/, 507 const gss_buffer_t /*input_token_buffer*/, 508 const gss_channel_bindings_t /*input_chan_bindings*/, 509 gss_name_t * /*src_name*/, 510 gss_OID * /*mech_type*/, 511 gss_buffer_t /*output_token*/, 512 OM_uint32 * /*ret_flags*/, 513 OM_uint32 * /*time_rec*/, 514 gss_cred_id_t * /*delegated_cred_handle*/ 515 ); 516 517 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_process_context_token 518 (OM_uint32 * /*minor_status*/, 519 const gss_ctx_id_t /*context_handle*/, 520 const gss_buffer_t /*token_buffer*/ 521 ); 522 523 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_sec_context 524 (OM_uint32 * /*minor_status*/, 525 gss_ctx_id_t * /*context_handle*/, 526 gss_buffer_t /*output_token*/ 527 ); 528 529 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_time 530 (OM_uint32 * /*minor_status*/, 531 const gss_ctx_id_t /*context_handle*/, 532 OM_uint32 * /*time_rec*/ 533 ); 534 535 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_mic 536 (OM_uint32 * /*minor_status*/, 537 const gss_ctx_id_t /*context_handle*/, 538 gss_qop_t /*qop_req*/, 539 const gss_buffer_t /*message_buffer*/, 540 gss_buffer_t /*message_token*/ 541 ); 542 543 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify_mic 544 (OM_uint32 * /*minor_status*/, 545 const gss_ctx_id_t /*context_handle*/, 546 const gss_buffer_t /*message_buffer*/, 547 const gss_buffer_t /*token_buffer*/, 548 gss_qop_t * /*qop_state*/ 549 ); 550 551 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap 552 (OM_uint32 * /*minor_status*/, 553 const gss_ctx_id_t /*context_handle*/, 554 int /*conf_req_flag*/, 555 gss_qop_t /*qop_req*/, 556 const gss_buffer_t /*input_message_buffer*/, 557 int * /*conf_state*/, 558 gss_buffer_t /*output_message_buffer*/ 559 ); 560 561 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap 562 (OM_uint32 * /*minor_status*/, 563 const gss_ctx_id_t /*context_handle*/, 564 const gss_buffer_t /*input_message_buffer*/, 565 gss_buffer_t /*output_message_buffer*/, 566 int * /*conf_state*/, 567 gss_qop_t * /*qop_state*/ 568 ); 569 570 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_status 571 (OM_uint32 * /*minor_status*/, 572 OM_uint32 /*status_value*/, 573 int /*status_type*/, 574 const gss_OID /*mech_type*/, 575 OM_uint32 * /*message_context*/, 576 gss_buffer_t /*status_string*/ 577 ); 578 579 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_indicate_mechs 580 (OM_uint32 * /*minor_status*/, 581 gss_OID_set * /*mech_set*/ 582 ); 583 584 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_compare_name 585 (OM_uint32 * /*minor_status*/, 586 const gss_name_t /*name1*/, 587 const gss_name_t /*name2*/, 588 int * /*name_equal*/ 589 ); 590 591 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name 592 (OM_uint32 * /*minor_status*/, 593 const gss_name_t /*input_name*/, 594 gss_buffer_t /*output_name_buffer*/, 595 gss_OID * /*output_name_type*/ 596 ); 597 598 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name 599 (OM_uint32 * /*minor_status*/, 600 const gss_buffer_t /*input_name_buffer*/, 601 const gss_OID /*input_name_type*/, 602 gss_name_t * /*output_name*/ 603 ); 604 605 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name 606 (OM_uint32 * /*minor_status*/, 607 const gss_name_t /*input_name*/, 608 gss_buffer_t /*exported_name*/ 609 ); 610 611 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name 612 (OM_uint32 * /*minor_status*/, 613 gss_name_t * /*input_name*/ 614 ); 615 616 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer 617 (OM_uint32 * /*minor_status*/, 618 gss_buffer_t /*buffer*/ 619 ); 620 621 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid_set 622 (OM_uint32 * /*minor_status*/, 623 gss_OID_set * /*set*/ 624 ); 625 626 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred 627 (OM_uint32 * /*minor_status*/, 628 const gss_cred_id_t /*cred_handle*/, 629 gss_name_t * /*name*/, 630 OM_uint32 * /*lifetime*/, 631 gss_cred_usage_t * /*cred_usage*/, 632 gss_OID_set * /*mechanisms*/ 633 ); 634 635 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_context ( 636 OM_uint32 * /*minor_status*/, 637 const gss_ctx_id_t /*context_handle*/, 638 gss_name_t * /*src_name*/, 639 gss_name_t * /*targ_name*/, 640 OM_uint32 * /*lifetime_rec*/, 641 gss_OID * /*mech_type*/, 642 OM_uint32 * /*ctx_flags*/, 643 int * /*locally_initiated*/, 644 int * /*open_context*/ 645 ); 646 647 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_size_limit ( 648 OM_uint32 * /*minor_status*/, 649 const gss_ctx_id_t /*context_handle*/, 650 int /*conf_req_flag*/, 651 gss_qop_t /*qop_req*/, 652 OM_uint32 /*req_output_size*/, 653 OM_uint32 * /*max_input_size*/ 654 ); 655 656 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred ( 657 OM_uint32 * /*minor_status*/, 658 const gss_cred_id_t /*input_cred_handle*/, 659 const gss_name_t /*desired_name*/, 660 const gss_OID /*desired_mech*/, 661 gss_cred_usage_t /*cred_usage*/, 662 OM_uint32 /*initiator_time_req*/, 663 OM_uint32 /*acceptor_time_req*/, 664 gss_cred_id_t * /*output_cred_handle*/, 665 gss_OID_set * /*actual_mechs*/, 666 OM_uint32 * /*initiator_time_rec*/, 667 OM_uint32 * /*acceptor_time_rec*/ 668 ); 669 670 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_mech ( 671 OM_uint32 * /*minor_status*/, 672 const gss_cred_id_t /*cred_handle*/, 673 const gss_OID /*mech_type*/, 674 gss_name_t * /*name*/, 675 OM_uint32 * /*initiator_lifetime*/, 676 OM_uint32 * /*acceptor_lifetime*/, 677 gss_cred_usage_t * /*cred_usage*/ 678 ); 679 680 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_sec_context ( 681 OM_uint32 * /*minor_status*/, 682 gss_ctx_id_t * /*context_handle*/, 683 gss_buffer_t /*interprocess_token*/ 684 ); 685 686 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_sec_context ( 687 OM_uint32 * /*minor_status*/, 688 const gss_buffer_t /*interprocess_token*/, 689 gss_ctx_id_t * /*context_handle*/ 690 ); 691 692 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_oid_set ( 693 OM_uint32 * /*minor_status*/, 694 gss_OID_set * /*oid_set*/ 695 ); 696 697 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member ( 698 OM_uint32 * /*minor_status*/, 699 const gss_OID /*member_oid*/, 700 gss_OID_set * /*oid_set*/ 701 ); 702 703 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_test_oid_set_member ( 704 OM_uint32 * /*minor_status*/, 705 const gss_OID /*member*/, 706 const gss_OID_set /*set*/, 707 int * /*present*/ 708 ); 709 710 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_names_for_mech ( 711 OM_uint32 * /*minor_status*/, 712 const gss_OID /*mechanism*/, 713 gss_OID_set * /*name_types*/ 714 ); 715 716 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_mechs_for_name ( 717 OM_uint32 * /*minor_status*/, 718 const gss_name_t /*input_name*/, 719 gss_OID_set * /*mech_types*/ 720 ); 721 722 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name ( 723 OM_uint32 * /*minor_status*/, 724 const gss_name_t /*input_name*/, 725 const gss_OID /*mech_type*/, 726 gss_name_t * /*output_name*/ 727 ); 728 729 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_name ( 730 OM_uint32 * /*minor_status*/, 731 const gss_name_t /*src_name*/, 732 gss_name_t * /*dest_name*/ 733 ); 734 735 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_oid ( 736 OM_uint32 * /* minor_status */, 737 gss_OID /* src_oid */, 738 gss_OID * /* dest_oid */ 739 ); 740 741 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 742 gss_release_oid 743 (OM_uint32 * /*minor_status*/, 744 gss_OID * /* oid */ 745 ); 746 747 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 748 gss_oid_to_str( 749 OM_uint32 * /*minor_status*/, 750 gss_OID /* oid */, 751 gss_buffer_t /* str */ 752 ); 753 754 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 755 gss_inquire_sec_context_by_oid( 756 OM_uint32 * minor_status, 757 const gss_ctx_id_t context_handle, 758 const gss_OID desired_object, 759 gss_buffer_set_t *data_set 760 ); 761 762 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 763 gss_set_sec_context_option (OM_uint32 *minor_status, 764 gss_ctx_id_t *context_handle, 765 const gss_OID desired_object, 766 const gss_buffer_t value); 767 768 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 769 gss_set_cred_option (OM_uint32 *minor_status, 770 gss_cred_id_t *cred_handle, 771 const gss_OID object, 772 const gss_buffer_t value); 773 774 GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL 775 gss_oid_equal(gss_const_OID a, gss_const_OID b); 776 777 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 778 gss_create_empty_buffer_set 779 (OM_uint32 * minor_status, 780 gss_buffer_set_t *buffer_set); 781 782 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 783 gss_add_buffer_set_member 784 (OM_uint32 * minor_status, 785 const gss_buffer_t member_buffer, 786 gss_buffer_set_t *buffer_set); 787 788 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 789 gss_release_buffer_set 790 (OM_uint32 * minor_status, 791 gss_buffer_set_t *buffer_set); 792 793 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 794 gss_inquire_cred_by_oid(OM_uint32 *minor_status, 795 const gss_cred_id_t cred_handle, 796 const gss_OID desired_object, 797 gss_buffer_set_t *data_set); 798 799 /* 800 * RFC 4401 801 */ 802 803 #define GSS_C_PRF_KEY_FULL 0 804 #define GSS_C_PRF_KEY_PARTIAL 1 805 806 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 807 gss_pseudo_random 808 (OM_uint32 *minor_status, 809 gss_ctx_id_t context, 810 int prf_key, 811 const gss_buffer_t prf_in, 812 ssize_t desired_output_len, 813 gss_buffer_t prf_out 814 ); 815 816 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 817 gss_store_cred(OM_uint32 * /* minor_status */, 818 gss_cred_id_t /* input_cred_handle */, 819 gss_cred_usage_t /* cred_usage */, 820 const gss_OID /* desired_mech */, 821 OM_uint32 /* overwrite_cred */, 822 OM_uint32 /* default_cred */, 823 gss_OID_set * /* elements_stored */, 824 gss_cred_usage_t * /* cred_usage_stored */); 825 826 827 /* 828 * Query functions 829 */ 830 831 typedef struct { 832 size_t header; /**< size of header */ 833 size_t trailer; /**< size of trailer */ 834 size_t max_msg_size; /**< maximum message size */ 835 size_t buffers; /**< extra GSS_IOV_BUFFER_TYPE_EMPTY buffer to pass */ 836 size_t blocksize; /**< Specificed optimal size of messages, also 837 is the maximum padding size 838 (GSS_IOV_BUFFER_TYPE_PADDING) */ 839 } gss_context_stream_sizes; 840 841 extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_attr_stream_sizes_oid_desc; 842 #define GSS_C_ATTR_STREAM_SIZES (&__gss_c_attr_stream_sizes_oid_desc) 843 844 845 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 846 gss_context_query_attributes(OM_uint32 * /* minor_status */, 847 const gss_ctx_id_t /* context_handle */, 848 const gss_OID /* attribute */, 849 void * /*data*/, 850 size_t /* len */); 851 /* 852 * The following routines are obsolete variants of gss_get_mic, 853 * gss_verify_mic, gss_wrap and gss_unwrap. They should be 854 * provided by GSSAPI V2 implementations for backwards 855 * compatibility with V1 applications. Distinct entrypoints 856 * (as opposed to #defines) should be provided, both to allow 857 * GSSAPI V1 applications to link against GSSAPI V2 implementations, 858 * and to retain the slight parameter type differences between the 859 * obsolete versions of these routines and their current forms. 860 */ 861 862 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign 863 (OM_uint32 * /*minor_status*/, 864 gss_ctx_id_t /*context_handle*/, 865 int /*qop_req*/, 866 gss_buffer_t /*message_buffer*/, 867 gss_buffer_t /*message_token*/ 868 ) GSSAPI_DEPRECATED_FUNCTION("Use gss_get_mic"); 869 870 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify 871 (OM_uint32 * /*minor_status*/, 872 gss_ctx_id_t /*context_handle*/, 873 gss_buffer_t /*message_buffer*/, 874 gss_buffer_t /*token_buffer*/, 875 int * /*qop_state*/ 876 ) GSSAPI_DEPRECATED_FUNCTION("Use gss_verify_mic"); 877 878 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal 879 (OM_uint32 * /*minor_status*/, 880 gss_ctx_id_t /*context_handle*/, 881 int /*conf_req_flag*/, 882 int /*qop_req*/, 883 gss_buffer_t /*input_message_buffer*/, 884 int * /*conf_state*/, 885 gss_buffer_t /*output_message_buffer*/ 886 ) GSSAPI_DEPRECATED_FUNCTION("Use gss_wrap"); 887 888 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal 889 (OM_uint32 * /*minor_status*/, 890 gss_ctx_id_t /*context_handle*/, 891 gss_buffer_t /*input_message_buffer*/, 892 gss_buffer_t /*output_message_buffer*/, 893 int * /*conf_state*/, 894 int * /*qop_state*/ 895 ) GSSAPI_DEPRECATED_FUNCTION("Use gss_unwrap"); 896 897 /** 898 * 899 */ 900 901 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 902 gss_encapsulate_token(gss_const_buffer_t /* input_token */, 903 gss_const_OID /* oid */, 904 gss_buffer_t /* output_token */); 905 906 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 907 gss_decapsulate_token(gss_const_buffer_t /* input_token */, 908 gss_const_OID /* oid */, 909 gss_buffer_t /* output_token */); 910 911 912 913 /* 914 * AEAD support 915 */ 916 917 /* 918 * GSS_IOV 919 */ 920 921 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 922 gss_wrap_iov(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *, 923 gss_iov_buffer_desc *, int); 924 925 926 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 927 gss_unwrap_iov(OM_uint32 *, gss_ctx_id_t, int *, gss_qop_t *, 928 gss_iov_buffer_desc *, int); 929 930 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 931 gss_wrap_iov_length(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *, 932 gss_iov_buffer_desc *, int); 933 934 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 935 gss_release_iov_buffer(OM_uint32 *, gss_iov_buffer_desc *, int); 936 937 938 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 939 gss_export_cred(OM_uint32 * /* minor_status */, 940 gss_cred_id_t /* cred_handle */, 941 gss_buffer_t /* cred_token */); 942 943 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 944 gss_import_cred(OM_uint32 * /* minor_status */, 945 gss_buffer_t /* cred_token */, 946 gss_cred_id_t * /* cred_handle */); 947 948 /* 949 * mech option 950 */ 951 952 GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL 953 gss_mo_set(gss_const_OID mech, gss_const_OID option, 954 int enable, gss_buffer_t value); 955 956 GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL 957 gss_mo_get(gss_const_OID mech, gss_const_OID option, gss_buffer_t value); 958 959 GSSAPI_LIB_FUNCTION void GSSAPI_LIB_CALL 960 gss_mo_list(gss_const_OID mech, gss_OID_set *options); 961 962 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 963 gss_mo_name(gss_const_OID mech, gss_const_OID options, gss_buffer_t name); 964 965 /* 966 * SASL glue functions and mech inquire 967 */ 968 969 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 970 gss_inquire_saslname_for_mech(OM_uint32 *minor_status, 971 const gss_OID desired_mech, 972 gss_buffer_t sasl_mech_name, 973 gss_buffer_t mech_name, 974 gss_buffer_t mech_description); 975 976 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 977 gss_inquire_mech_for_saslname(OM_uint32 *minor_status, 978 const gss_buffer_t sasl_mech_name, 979 gss_OID *mech_type); 980 981 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 982 gss_indicate_mechs_by_attrs(OM_uint32 * minor_status, 983 gss_const_OID_set desired_mech_attrs, 984 gss_const_OID_set except_mech_attrs, 985 gss_const_OID_set critical_mech_attrs, 986 gss_OID_set *mechs); 987 988 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 989 gss_inquire_attrs_for_mech(OM_uint32 * minor_status, 990 gss_const_OID mech, 991 gss_OID_set *mech_attr, 992 gss_OID_set *known_mech_attrs); 993 994 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 995 gss_display_mech_attr(OM_uint32 * minor_status, 996 gss_const_OID mech_attr, 997 gss_buffer_t name, 998 gss_buffer_t short_desc, 999 gss_buffer_t long_desc); 1000 1001 /* 1002 * Solaris compat 1003 */ 1004 1005 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred_with_password 1006 (OM_uint32 * /*minor_status*/, 1007 const gss_name_t /*desired_name*/, 1008 const gss_buffer_t /*password*/, 1009 OM_uint32 /*time_req*/, 1010 const gss_OID_set /*desired_mechs*/, 1011 gss_cred_usage_t /*cred_usage*/, 1012 gss_cred_id_t * /*output_cred_handle*/, 1013 gss_OID_set * /*actual_mechs*/, 1014 OM_uint32 * /*time_rec*/ 1015 ); 1016 1017 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred_with_password ( 1018 OM_uint32 * /*minor_status*/, 1019 const gss_cred_id_t /*input_cred_handle*/, 1020 const gss_name_t /*desired_name*/, 1021 const gss_OID /*desired_mech*/, 1022 const gss_buffer_t /*password*/, 1023 gss_cred_usage_t /*cred_usage*/, 1024 OM_uint32 /*initiator_time_req*/, 1025 OM_uint32 /*acceptor_time_req*/, 1026 gss_cred_id_t * /*output_cred_handle*/, 1027 gss_OID_set * /*actual_mechs*/, 1028 OM_uint32 * /*initiator_time_rec*/, 1029 OM_uint32 * /*acceptor_time_rec*/ 1030 ); 1031 1032 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 1033 gss_pname_to_uid( 1034 OM_uint32 *minor, 1035 const gss_name_t name, 1036 const gss_OID mech_type, 1037 uid_t *uidOut); 1038 1039 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL 1040 gss_authorize_localname( 1041 OM_uint32 *minor, 1042 const gss_name_t name, 1043 const gss_name_t user); 1044 1045 GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL 1046 gss_userok(const gss_name_t name, 1047 const char *user); 1048 1049 extern GSSAPI_LIB_VARIABLE gss_buffer_desc __gss_c_attr_local_login_user; 1050 #define GSS_C_ATTR_LOCAL_LOGIN_USER (&__gss_c_attr_local_login_user) 1051 1052 /* 1053 * Naming extensions 1054 */ 1055 1056 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name_ext ( 1057 OM_uint32 *, /* minor_status */ 1058 gss_name_t, /* name */ 1059 gss_OID, /* display_as_name_type */ 1060 gss_buffer_t /* display_name */ 1061 ); 1062 1063 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_name ( 1064 OM_uint32 *, /* minor_status */ 1065 gss_name_t, /* name */ 1066 int *, /* name_is_MN */ 1067 gss_OID *, /* MN_mech */ 1068 gss_buffer_set_t * /* attrs */ 1069 ); 1070 1071 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_name_attribute ( 1072 OM_uint32 *, /* minor_status */ 1073 gss_name_t, /* name */ 1074 gss_buffer_t, /* attr */ 1075 int *, /* authenticated */ 1076 int *, /* complete */ 1077 gss_buffer_t, /* value */ 1078 gss_buffer_t, /* display_value */ 1079 int * /* more */ 1080 ); 1081 1082 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_name_attribute ( 1083 OM_uint32 *, /* minor_status */ 1084 gss_name_t, /* name */ 1085 int, /* complete */ 1086 gss_buffer_t, /* attr */ 1087 gss_buffer_t /* value */ 1088 ); 1089 1090 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_name_attribute ( 1091 OM_uint32 *, /* minor_status */ 1092 gss_name_t, /* name */ 1093 gss_buffer_t /* attr */ 1094 ); 1095 1096 GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name_composite ( 1097 OM_uint32 *, /* minor_status */ 1098 gss_name_t, /* name */ 1099 gss_buffer_t /* exp_composite_name */ 1100 ); 1101 1102 /* 1103 * 1104 */ 1105 1106 GSSAPI_LIB_FUNCTION const char * GSSAPI_LIB_CALL 1107 gss_oid_to_name(gss_const_OID oid); 1108 1109 GSSAPI_LIB_FUNCTION gss_OID GSSAPI_LIB_CALL 1110 gss_name_to_oid(const char *name); 1111 1112 GSSAPI_CPP_END 1113 1114 #if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__) || defined(__i386__) || defined(__x86_64__)) 1115 #pragma pack(pop) 1116 #endif 1117 1118 #undef GSSAPI_DEPRECATED_FUNCTION 1119 1120 #endif /* GSSAPI_GSSAPI_H_ */ 1121