1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 3*0Sstevel@tonic-gate * Use is subject to license terms. 4*0Sstevel@tonic-gate */ 5*0Sstevel@tonic-gate 6*0Sstevel@tonic-gate /* 7*0Sstevel@tonic-gate * Copyright 1993 by OpenVision Technologies, Inc. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * Permission to use, copy, modify, distribute, and sell this software 10*0Sstevel@tonic-gate * and its documentation for any purpose is hereby granted without fee, 11*0Sstevel@tonic-gate * provided that the above copyright notice appears in all copies and 12*0Sstevel@tonic-gate * that both that copyright notice and this permission notice appear in 13*0Sstevel@tonic-gate * supporting documentation, and that the name of OpenVision not be used 14*0Sstevel@tonic-gate * in advertising or publicity pertaining to distribution of the software 15*0Sstevel@tonic-gate * without specific, written prior permission. OpenVision makes no 16*0Sstevel@tonic-gate * representations about the suitability of this software for any 17*0Sstevel@tonic-gate * purpose. It is provided "as is" without express or implied warranty. 18*0Sstevel@tonic-gate * 19*0Sstevel@tonic-gate * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 20*0Sstevel@tonic-gate * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 21*0Sstevel@tonic-gate * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR 22*0Sstevel@tonic-gate * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 23*0Sstevel@tonic-gate * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 24*0Sstevel@tonic-gate * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 25*0Sstevel@tonic-gate * PERFORMANCE OF THIS SOFTWARE. 26*0Sstevel@tonic-gate */ 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gate #ifndef _GSSAPI_H_ 29*0Sstevel@tonic-gate #define _GSSAPI_H_ 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 32*0Sstevel@tonic-gate 33*0Sstevel@tonic-gate #ifdef __cplusplus 34*0Sstevel@tonic-gate extern "C" { 35*0Sstevel@tonic-gate #endif 36*0Sstevel@tonic-gate 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate /* 39*0Sstevel@tonic-gate * First, include sys/types.h to get size_t defined. 40*0Sstevel@tonic-gate */ 41*0Sstevel@tonic-gate #include <sys/types.h> 42*0Sstevel@tonic-gate 43*0Sstevel@tonic-gate /* 44*0Sstevel@tonic-gate * If the platform supports the xom.h header file, it should be 45*0Sstevel@tonic-gate * included here. 46*0Sstevel@tonic-gate */ 47*0Sstevel@tonic-gate #ifdef HAVE_XOM_H 48*0Sstevel@tonic-gate #include <xom.h> 49*0Sstevel@tonic-gate #endif 50*0Sstevel@tonic-gate 51*0Sstevel@tonic-gate /* 52*0Sstevel@tonic-gate * Now define the three implementation-dependent types. 53*0Sstevel@tonic-gate */ 54*0Sstevel@tonic-gate struct gss_ctx_id; 55*0Sstevel@tonic-gate struct gss_cred_id; 56*0Sstevel@tonic-gate struct gss_name; 57*0Sstevel@tonic-gate 58*0Sstevel@tonic-gate typedef struct gss_ctx_id *gss_ctx_id_t; 59*0Sstevel@tonic-gate typedef struct gss_cred_id *gss_cred_id_t; 60*0Sstevel@tonic-gate typedef struct gss_name *gss_name_t; 61*0Sstevel@tonic-gate 62*0Sstevel@tonic-gate /* 63*0Sstevel@tonic-gate * The following type must be defined as the smallest natural 64*0Sstevel@tonic-gate * unsigned integer supported by the platform that has at least 65*0Sstevel@tonic-gate * 32 bits of precision. 66*0Sstevel@tonic-gate */ 67*0Sstevel@tonic-gate typedef unsigned int gss_uint32; 68*0Sstevel@tonic-gate typedef int gss_int32; 69*0Sstevel@tonic-gate 70*0Sstevel@tonic-gate 71*0Sstevel@tonic-gate #ifdef OM_STRING 72*0Sstevel@tonic-gate /* 73*0Sstevel@tonic-gate * We have included the xom.h header file. Verify that OM_uint32 74*0Sstevel@tonic-gate * is defined correctly. 75*0Sstevel@tonic-gate */ 76*0Sstevel@tonic-gate 77*0Sstevel@tonic-gate #if sizeof (gss_uint32) != sizeof (OM_uint32) 78*0Sstevel@tonic-gate #error Incompatible definition of OM_uint32 from xom.h 79*0Sstevel@tonic-gate #endif 80*0Sstevel@tonic-gate 81*0Sstevel@tonic-gate typedef OM_object_identifier gss_OID_desc, *gss_OID; 82*0Sstevel@tonic-gate 83*0Sstevel@tonic-gate #else 84*0Sstevel@tonic-gate 85*0Sstevel@tonic-gate 86*0Sstevel@tonic-gate 87*0Sstevel@tonic-gate /* 88*0Sstevel@tonic-gate * We can't use X/Open definitions, so roll our own. 89*0Sstevel@tonic-gate */ 90*0Sstevel@tonic-gate 91*0Sstevel@tonic-gate typedef gss_uint32 OM_uint32; 92*0Sstevel@tonic-gate 93*0Sstevel@tonic-gate typedef struct gss_OID_desc_struct { 94*0Sstevel@tonic-gate OM_uint32 length; 95*0Sstevel@tonic-gate void*elements; 96*0Sstevel@tonic-gate } gss_OID_desc, *gss_OID; 97*0Sstevel@tonic-gate 98*0Sstevel@tonic-gate #endif 99*0Sstevel@tonic-gate 100*0Sstevel@tonic-gate typedef struct gss_OID_set_desc_struct { 101*0Sstevel@tonic-gate size_t count; 102*0Sstevel@tonic-gate gss_OID elements; 103*0Sstevel@tonic-gate } gss_OID_set_desc, *gss_OID_set; 104*0Sstevel@tonic-gate 105*0Sstevel@tonic-gate #ifdef _SYSCALL32 106*0Sstevel@tonic-gate typedef struct gss_OID_desc_struct32 { 107*0Sstevel@tonic-gate OM_uint32 length; 108*0Sstevel@tonic-gate caddr32_t elements; 109*0Sstevel@tonic-gate } gss_OID_desc32, *gss_OID32; 110*0Sstevel@tonic-gate #endif /* _SYSCALL32 */ 111*0Sstevel@tonic-gate 112*0Sstevel@tonic-gate typedef struct gss_buffer_desc_struct { 113*0Sstevel@tonic-gate size_t length; 114*0Sstevel@tonic-gate void *value; 115*0Sstevel@tonic-gate } gss_buffer_desc, *gss_buffer_t; 116*0Sstevel@tonic-gate 117*0Sstevel@tonic-gate typedef struct gss_channel_bindings_struct { 118*0Sstevel@tonic-gate OM_uint32 initiator_addrtype; 119*0Sstevel@tonic-gate gss_buffer_desc initiator_address; 120*0Sstevel@tonic-gate OM_uint32 acceptor_addrtype; 121*0Sstevel@tonic-gate gss_buffer_desc acceptor_address; 122*0Sstevel@tonic-gate gss_buffer_desc application_data; 123*0Sstevel@tonic-gate } *gss_channel_bindings_t; 124*0Sstevel@tonic-gate 125*0Sstevel@tonic-gate /* 126*0Sstevel@tonic-gate * For now, define a QOP-type as an OM_uint32 127*0Sstevel@tonic-gate */ 128*0Sstevel@tonic-gate typedef OM_uint32 gss_qop_t; 129*0Sstevel@tonic-gate typedef int gss_cred_usage_t; 130*0Sstevel@tonic-gate 131*0Sstevel@tonic-gate /* 132*0Sstevel@tonic-gate * Flag bits for context-level services. 133*0Sstevel@tonic-gate */ 134*0Sstevel@tonic-gate #define GSS_C_DELEG_FLAG 1 135*0Sstevel@tonic-gate #define GSS_C_MUTUAL_FLAG 2 136*0Sstevel@tonic-gate #define GSS_C_REPLAY_FLAG 4 137*0Sstevel@tonic-gate #define GSS_C_SEQUENCE_FLAG 8 138*0Sstevel@tonic-gate #define GSS_C_CONF_FLAG 16 139*0Sstevel@tonic-gate #define GSS_C_INTEG_FLAG 32 140*0Sstevel@tonic-gate #define GSS_C_ANON_FLAG 64 141*0Sstevel@tonic-gate #define GSS_C_PROT_READY_FLAG 128 142*0Sstevel@tonic-gate #define GSS_C_TRANS_FLAG 256 143*0Sstevel@tonic-gate 144*0Sstevel@tonic-gate /* 145*0Sstevel@tonic-gate * Credential usage options 146*0Sstevel@tonic-gate */ 147*0Sstevel@tonic-gate #define GSS_C_BOTH 0 148*0Sstevel@tonic-gate #define GSS_C_INITIATE 1 149*0Sstevel@tonic-gate #define GSS_C_ACCEPT 2 150*0Sstevel@tonic-gate 151*0Sstevel@tonic-gate /* 152*0Sstevel@tonic-gate * Status code types for gss_display_status 153*0Sstevel@tonic-gate */ 154*0Sstevel@tonic-gate #define GSS_C_GSS_CODE 1 155*0Sstevel@tonic-gate #define GSS_C_MECH_CODE 2 156*0Sstevel@tonic-gate 157*0Sstevel@tonic-gate /* 158*0Sstevel@tonic-gate * The constant definitions for channel-bindings address families 159*0Sstevel@tonic-gate */ 160*0Sstevel@tonic-gate #define GSS_C_AF_UNSPEC 0 161*0Sstevel@tonic-gate #define GSS_C_AF_LOCAL 1 162*0Sstevel@tonic-gate #define GSS_C_AF_INET 2 163*0Sstevel@tonic-gate #define GSS_C_AF_IMPLINK 3 164*0Sstevel@tonic-gate #define GSS_C_AF_PUP 4 165*0Sstevel@tonic-gate #define GSS_C_AF_CHAOS 5 166*0Sstevel@tonic-gate #define GSS_C_AF_NS 6 167*0Sstevel@tonic-gate #define GSS_C_AF_NBS 7 168*0Sstevel@tonic-gate #define GSS_C_AF_ECMA 8 169*0Sstevel@tonic-gate #define GSS_C_AF_DATAKIT 9 170*0Sstevel@tonic-gate #define GSS_C_AF_CCITT 10 171*0Sstevel@tonic-gate #define GSS_C_AF_SNA 11 172*0Sstevel@tonic-gate #define GSS_C_AF_DECnet 12 173*0Sstevel@tonic-gate #define GSS_C_AF_DLI 13 174*0Sstevel@tonic-gate #define GSS_C_AF_LAT 14 175*0Sstevel@tonic-gate #define GSS_C_AF_HYLINK 15 176*0Sstevel@tonic-gate #define GSS_C_AF_APPLETALK 16 177*0Sstevel@tonic-gate #define GSS_C_AF_BSC 17 178*0Sstevel@tonic-gate #define GSS_C_AF_DSS 18 179*0Sstevel@tonic-gate #define GSS_C_AF_OSI 19 180*0Sstevel@tonic-gate #define GSS_C_AF_X25 21 181*0Sstevel@tonic-gate 182*0Sstevel@tonic-gate #define GSS_C_AF_NULLADDR 255 183*0Sstevel@tonic-gate 184*0Sstevel@tonic-gate /* 185*0Sstevel@tonic-gate * Various Null values 186*0Sstevel@tonic-gate */ 187*0Sstevel@tonic-gate #define GSS_C_NO_NAME ((gss_name_t) 0) 188*0Sstevel@tonic-gate #define GSS_C_NO_BUFFER ((gss_buffer_t) 0) 189*0Sstevel@tonic-gate #define GSS_C_NO_OID ((gss_OID) 0) 190*0Sstevel@tonic-gate #define GSS_C_NO_OID_SET ((gss_OID_set) 0) 191*0Sstevel@tonic-gate #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) 192*0Sstevel@tonic-gate #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) 193*0Sstevel@tonic-gate #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) 194*0Sstevel@tonic-gate #define GSS_C_EMPTY_BUFFER {0, NULL} 195*0Sstevel@tonic-gate 196*0Sstevel@tonic-gate /* 197*0Sstevel@tonic-gate * Some alternate names for a couple of the above 198*0Sstevel@tonic-gate * values. These are defined for V1 compatibility. 199*0Sstevel@tonic-gate */ 200*0Sstevel@tonic-gate #define GSS_C_NULL_OID GSS_C_NO_OID 201*0Sstevel@tonic-gate #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET 202*0Sstevel@tonic-gate 203*0Sstevel@tonic-gate /* 204*0Sstevel@tonic-gate * Define the default Quality of Protection for per-message 205*0Sstevel@tonic-gate * services. Note that an implementation that offers multiple 206*0Sstevel@tonic-gate * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero 207*0Sstevel@tonic-gate * (as done here) to mean "default protection", or to a specific 208*0Sstevel@tonic-gate * explicit QOP value. However, a value of 0 should always be 209*0Sstevel@tonic-gate * interpreted by a GSSAPI implementation as a request for the 210*0Sstevel@tonic-gate * default protection level. 211*0Sstevel@tonic-gate */ 212*0Sstevel@tonic-gate #define GSS_C_QOP_DEFAULT 0 213*0Sstevel@tonic-gate 214*0Sstevel@tonic-gate /* 215*0Sstevel@tonic-gate * Expiration time of 2^32-1 seconds means infinite lifetime for a 216*0Sstevel@tonic-gate * credential or security context 217*0Sstevel@tonic-gate */ 218*0Sstevel@tonic-gate #define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful) 219*0Sstevel@tonic-gate 220*0Sstevel@tonic-gate /* 221*0Sstevel@tonic-gate * The implementation must reserve static storage for a 222*0Sstevel@tonic-gate * gss_OID_desc object containing the value 223*0Sstevel@tonic-gate * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 224*0Sstevel@tonic-gate * "\x01\x02\x01\x01"}, 225*0Sstevel@tonic-gate * corresponding to an object-identifier value of 226*0Sstevel@tonic-gate * {iso(1) member-body(2) United States(840) mit(113554) 227*0Sstevel@tonic-gate * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant 228*0Sstevel@tonic-gate * GSS_C_NT_USER_NAME should be initialized to point 229*0Sstevel@tonic-gate * to that gss_OID_desc. 230*0Sstevel@tonic-gate */ 231*0Sstevel@tonic-gate extern const gss_OID GSS_C_NT_USER_NAME; 232*0Sstevel@tonic-gate 233*0Sstevel@tonic-gate /* 234*0Sstevel@tonic-gate * The implementation must reserve static storage for a 235*0Sstevel@tonic-gate * gss_OID_desc object containing the value 236*0Sstevel@tonic-gate * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 237*0Sstevel@tonic-gate * "\x01\x02\x01\x02"}, 238*0Sstevel@tonic-gate * corresponding to an object-identifier value of 239*0Sstevel@tonic-gate * {iso(1) member-body(2) United States(840) mit(113554) 240*0Sstevel@tonic-gate * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. 241*0Sstevel@tonic-gate * The constant GSS_C_NT_MACHINE_UID_NAME should be 242*0Sstevel@tonic-gate * initialized to point to that gss_OID_desc. 243*0Sstevel@tonic-gate */ 244*0Sstevel@tonic-gate extern const gss_OID GSS_C_NT_MACHINE_UID_NAME; 245*0Sstevel@tonic-gate 246*0Sstevel@tonic-gate /* 247*0Sstevel@tonic-gate * The implementation must reserve static storage for a 248*0Sstevel@tonic-gate * gss_OID_desc object containing the value 249*0Sstevel@tonic-gate * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" 250*0Sstevel@tonic-gate * "\x01\x02\x01\x03"}, 251*0Sstevel@tonic-gate * corresponding to an object-identifier value of 252*0Sstevel@tonic-gate * {iso(1) member-body(2) United States(840) mit(113554) 253*0Sstevel@tonic-gate * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. 254*0Sstevel@tonic-gate * The constant GSS_C_NT_STRING_UID_NAME should be 255*0Sstevel@tonic-gate * initialized to point to that gss_OID_desc. 256*0Sstevel@tonic-gate */ 257*0Sstevel@tonic-gate extern const gss_OID GSS_C_NT_STRING_UID_NAME; 258*0Sstevel@tonic-gate 259*0Sstevel@tonic-gate /* 260*0Sstevel@tonic-gate * The implementation must reserve static storage for a 261*0Sstevel@tonic-gate * gss_OID_desc object containing the value 262*0Sstevel@tonic-gate * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, 263*0Sstevel@tonic-gate * corresponding to an object-identifier value of 264*0Sstevel@tonic-gate * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 265*0Sstevel@tonic-gate * 6(nametypes), 2(gss-host-based-services)}. The constant 266*0Sstevel@tonic-gate * GSS_C_NT_HOSTBASED_SERVICE should be initialized to point 267*0Sstevel@tonic-gate * to that gss_OID_desc. 268*0Sstevel@tonic-gate */ 269*0Sstevel@tonic-gate extern const gss_OID GSS_C_NT_HOSTBASED_SERVICE; 270*0Sstevel@tonic-gate 271*0Sstevel@tonic-gate /* 272*0Sstevel@tonic-gate * The implementation must reserve static storage for a 273*0Sstevel@tonic-gate * gss_OID_desc object containing the value 274*0Sstevel@tonic-gate * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, 275*0Sstevel@tonic-gate * corresponding to an object identifier value of 276*0Sstevel@tonic-gate * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 277*0Sstevel@tonic-gate * 6(nametypes), 3(gss-anonymous-name)}. The constant 278*0Sstevel@tonic-gate * and GSS_C_NT_ANONYMOUS should be initialized to point 279*0Sstevel@tonic-gate * to that gss_OID_desc. 280*0Sstevel@tonic-gate */ 281*0Sstevel@tonic-gate extern const gss_OID GSS_C_NT_ANONYMOUS; 282*0Sstevel@tonic-gate 283*0Sstevel@tonic-gate /* 284*0Sstevel@tonic-gate * The implementation must reserve static storage for a 285*0Sstevel@tonic-gate * gss_OID_desc object containing the value 286*0Sstevel@tonic-gate * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, 287*0Sstevel@tonic-gate * corresponding to an object-identifier value of 288*0Sstevel@tonic-gate * {1(iso), 3(org), 6(dod), 1(internet), 5(security), 289*0Sstevel@tonic-gate * 6(nametypes), 4(gss-api-exported-name)}. The constant 290*0Sstevel@tonic-gate * GSS_C_NT_EXPORT_NAME should be initialized to point 291*0Sstevel@tonic-gate * to that gss_OID_desc. 292*0Sstevel@tonic-gate */ 293*0Sstevel@tonic-gate extern const gss_OID GSS_C_NT_EXPORT_NAME; 294*0Sstevel@tonic-gate 295*0Sstevel@tonic-gate 296*0Sstevel@tonic-gate /* Major status codes */ 297*0Sstevel@tonic-gate 298*0Sstevel@tonic-gate #define GSS_S_COMPLETE 0 299*0Sstevel@tonic-gate 300*0Sstevel@tonic-gate /* 301*0Sstevel@tonic-gate * Some "helper" definitions to make the status code macros obvious. 302*0Sstevel@tonic-gate */ 303*0Sstevel@tonic-gate #define GSS_C_CALLING_ERROR_OFFSET 24 304*0Sstevel@tonic-gate #define GSS_C_ROUTINE_ERROR_OFFSET 16 305*0Sstevel@tonic-gate #define GSS_C_SUPPLEMENTARY_OFFSET 0 306*0Sstevel@tonic-gate #define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul) 307*0Sstevel@tonic-gate #define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul) 308*0Sstevel@tonic-gate #define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul) 309*0Sstevel@tonic-gate 310*0Sstevel@tonic-gate /* 311*0Sstevel@tonic-gate * The macros that test status codes for error conditions. 312*0Sstevel@tonic-gate * Note that the GSS_ERROR() macro has changed slightly from 313*0Sstevel@tonic-gate * the V1 GSSAPI so that it now evaluates its argument 314*0Sstevel@tonic-gate * only once. 315*0Sstevel@tonic-gate */ 316*0Sstevel@tonic-gate #define GSS_CALLING_ERROR(x) \ 317*0Sstevel@tonic-gate ((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) 318*0Sstevel@tonic-gate #define GSS_ROUTINE_ERROR(x) \ 319*0Sstevel@tonic-gate ((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) 320*0Sstevel@tonic-gate #define GSS_SUPPLEMENTARY_INFO(x) \ 321*0Sstevel@tonic-gate ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) 322*0Sstevel@tonic-gate #define GSS_ERROR(x) \ 323*0Sstevel@tonic-gate ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ 324*0Sstevel@tonic-gate (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) 325*0Sstevel@tonic-gate 326*0Sstevel@tonic-gate /* 327*0Sstevel@tonic-gate * Now the actual status code definitions 328*0Sstevel@tonic-gate */ 329*0Sstevel@tonic-gate 330*0Sstevel@tonic-gate /* 331*0Sstevel@tonic-gate * Calling errors: 332*0Sstevel@tonic-gate */ 333*0Sstevel@tonic-gate #define GSS_S_CALL_INACCESSIBLE_READ \ 334*0Sstevel@tonic-gate (((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET) 335*0Sstevel@tonic-gate #define GSS_S_CALL_INACCESSIBLE_WRITE \ 336*0Sstevel@tonic-gate (((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET) 337*0Sstevel@tonic-gate #define GSS_S_CALL_BAD_STRUCTURE \ 338*0Sstevel@tonic-gate (((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET) 339*0Sstevel@tonic-gate 340*0Sstevel@tonic-gate /* 341*0Sstevel@tonic-gate * Routine errors: 342*0Sstevel@tonic-gate */ 343*0Sstevel@tonic-gate #define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET) 344*0Sstevel@tonic-gate #define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET) 345*0Sstevel@tonic-gate #define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET) 346*0Sstevel@tonic-gate #define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET) 347*0Sstevel@tonic-gate #define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET) 348*0Sstevel@tonic-gate #define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET) 349*0Sstevel@tonic-gate #define GSS_S_BAD_MIC GSS_S_BAD_SIG 350*0Sstevel@tonic-gate #define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET) 351*0Sstevel@tonic-gate #define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET) 352*0Sstevel@tonic-gate #define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET) 353*0Sstevel@tonic-gate #define GSS_S_DEFECTIVE_CREDENTIAL \ 354*0Sstevel@tonic-gate (((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET) 355*0Sstevel@tonic-gate #define GSS_S_CREDENTIALS_EXPIRED \ 356*0Sstevel@tonic-gate (((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET) 357*0Sstevel@tonic-gate #define GSS_S_CONTEXT_EXPIRED \ 358*0Sstevel@tonic-gate (((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET) 359*0Sstevel@tonic-gate #define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET) 360*0Sstevel@tonic-gate #define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET) 361*0Sstevel@tonic-gate #define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET) 362*0Sstevel@tonic-gate #define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET) 363*0Sstevel@tonic-gate #define GSS_S_DUPLICATE_ELEMENT \ 364*0Sstevel@tonic-gate (((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET) 365*0Sstevel@tonic-gate #define GSS_S_NAME_NOT_MN (((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET) 366*0Sstevel@tonic-gate 367*0Sstevel@tonic-gate /* 368*0Sstevel@tonic-gate * Supplementary info bits: 369*0Sstevel@tonic-gate */ 370*0Sstevel@tonic-gate #define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) 371*0Sstevel@tonic-gate #define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) 372*0Sstevel@tonic-gate #define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) 373*0Sstevel@tonic-gate #define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) 374*0Sstevel@tonic-gate #define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) 375*0Sstevel@tonic-gate 376*0Sstevel@tonic-gate 377*0Sstevel@tonic-gate /* 378*0Sstevel@tonic-gate * Finally, function prototypes for the GSS-API routines. 379*0Sstevel@tonic-gate */ 380*0Sstevel@tonic-gate 381*0Sstevel@tonic-gate OM_uint32 gss_acquire_cred( 382*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 383*0Sstevel@tonic-gate const gss_name_t, /* desired_name */ 384*0Sstevel@tonic-gate OM_uint32, /* time_req */ 385*0Sstevel@tonic-gate const gss_OID_set, /* desired_mechs */ 386*0Sstevel@tonic-gate gss_cred_usage_t, /* cred_usage */ 387*0Sstevel@tonic-gate gss_cred_id_t *, /* output_cred_handle */ 388*0Sstevel@tonic-gate gss_OID_set *, /* actual_mechs */ 389*0Sstevel@tonic-gate OM_uint32 * /* time_rec */ 390*0Sstevel@tonic-gate ); 391*0Sstevel@tonic-gate 392*0Sstevel@tonic-gate OM_uint32 gss_release_cred( 393*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 394*0Sstevel@tonic-gate gss_cred_id_t * /* cred_handle */ 395*0Sstevel@tonic-gate ); 396*0Sstevel@tonic-gate 397*0Sstevel@tonic-gate OM_uint32 gss_init_sec_context( 398*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 399*0Sstevel@tonic-gate const gss_cred_id_t, /* initiator_cred_handle */ 400*0Sstevel@tonic-gate gss_ctx_id_t *, /* context_handle */ 401*0Sstevel@tonic-gate const gss_name_t, /* target_name */ 402*0Sstevel@tonic-gate const gss_OID, /* mech_type */ 403*0Sstevel@tonic-gate OM_uint32, /* req_flags */ 404*0Sstevel@tonic-gate OM_uint32, /* time_req */ 405*0Sstevel@tonic-gate gss_channel_bindings_t, /* input_chan_bindings */ 406*0Sstevel@tonic-gate const gss_buffer_t, /* input_token */ 407*0Sstevel@tonic-gate gss_OID *, /* actual_mech_type */ 408*0Sstevel@tonic-gate gss_buffer_t, /* output_token */ 409*0Sstevel@tonic-gate OM_uint32 *, /* ret_flags */ 410*0Sstevel@tonic-gate OM_uint32 * /* time_rec */ 411*0Sstevel@tonic-gate ); 412*0Sstevel@tonic-gate 413*0Sstevel@tonic-gate OM_uint32 gss_accept_sec_context( 414*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 415*0Sstevel@tonic-gate gss_ctx_id_t *, /* context_handle */ 416*0Sstevel@tonic-gate const gss_cred_id_t, /* acceptor_cred_handle */ 417*0Sstevel@tonic-gate const gss_buffer_t, /* input_token_buffer */ 418*0Sstevel@tonic-gate const gss_channel_bindings_t, /* input_chan_bindings */ 419*0Sstevel@tonic-gate gss_name_t *, /* src_name */ 420*0Sstevel@tonic-gate gss_OID *, /* mech_type */ 421*0Sstevel@tonic-gate gss_buffer_t, /* output_token */ 422*0Sstevel@tonic-gate OM_uint32 *, /* ret_flags */ 423*0Sstevel@tonic-gate OM_uint32 *, /* time_rec */ 424*0Sstevel@tonic-gate gss_cred_id_t * /* delegated_cred_handle */ 425*0Sstevel@tonic-gate ); 426*0Sstevel@tonic-gate 427*0Sstevel@tonic-gate OM_uint32 gss_process_context_token( 428*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 429*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 430*0Sstevel@tonic-gate const gss_buffer_t /* token_buffer */ 431*0Sstevel@tonic-gate ); 432*0Sstevel@tonic-gate 433*0Sstevel@tonic-gate OM_uint32 gss_delete_sec_context( 434*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 435*0Sstevel@tonic-gate gss_ctx_id_t *, /* context_handle */ 436*0Sstevel@tonic-gate gss_buffer_t /* output_token */ 437*0Sstevel@tonic-gate ); 438*0Sstevel@tonic-gate 439*0Sstevel@tonic-gate OM_uint32 gss_context_time( 440*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 441*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 442*0Sstevel@tonic-gate OM_uint32 * /* time_rec */ 443*0Sstevel@tonic-gate ); 444*0Sstevel@tonic-gate 445*0Sstevel@tonic-gate OM_uint32 gss_get_mic( 446*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 447*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 448*0Sstevel@tonic-gate gss_qop_t, /* qop_req */ 449*0Sstevel@tonic-gate const gss_buffer_t, /* message_buffer */ 450*0Sstevel@tonic-gate gss_buffer_t /* message_token */ 451*0Sstevel@tonic-gate ); 452*0Sstevel@tonic-gate 453*0Sstevel@tonic-gate OM_uint32 gss_verify_mic( 454*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 455*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 456*0Sstevel@tonic-gate const gss_buffer_t, /* message_buffer */ 457*0Sstevel@tonic-gate const gss_buffer_t, /* token_buffer */ 458*0Sstevel@tonic-gate gss_qop_t * /* qop_state */ 459*0Sstevel@tonic-gate ); 460*0Sstevel@tonic-gate 461*0Sstevel@tonic-gate OM_uint32 gss_wrap( 462*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 463*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 464*0Sstevel@tonic-gate int, /* conf_req_flag */ 465*0Sstevel@tonic-gate gss_qop_t, /* qop_req */ 466*0Sstevel@tonic-gate const gss_buffer_t, /* input_message_buffer */ 467*0Sstevel@tonic-gate int *, /* conf_state */ 468*0Sstevel@tonic-gate gss_buffer_t /* output_message_buffer */ 469*0Sstevel@tonic-gate ); 470*0Sstevel@tonic-gate 471*0Sstevel@tonic-gate OM_uint32 gss_unwrap( 472*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 473*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 474*0Sstevel@tonic-gate const gss_buffer_t, /* input_message_buffer */ 475*0Sstevel@tonic-gate gss_buffer_t, /* output_message_buffer */ 476*0Sstevel@tonic-gate int *, /* conf_state */ 477*0Sstevel@tonic-gate gss_qop_t * /* qop_state */ 478*0Sstevel@tonic-gate ); 479*0Sstevel@tonic-gate 480*0Sstevel@tonic-gate OM_uint32 gss_display_status( 481*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 482*0Sstevel@tonic-gate OM_uint32, /* status_value */ 483*0Sstevel@tonic-gate int, /* status_type */ 484*0Sstevel@tonic-gate const gss_OID, /* mech_type */ 485*0Sstevel@tonic-gate OM_uint32 *, /* message_context */ 486*0Sstevel@tonic-gate gss_buffer_t /* status_string */ 487*0Sstevel@tonic-gate ); 488*0Sstevel@tonic-gate 489*0Sstevel@tonic-gate OM_uint32 gss_indicate_mechs( 490*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 491*0Sstevel@tonic-gate gss_OID_set * /* mech_set */ 492*0Sstevel@tonic-gate ); 493*0Sstevel@tonic-gate 494*0Sstevel@tonic-gate OM_uint32 gss_compare_name( 495*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 496*0Sstevel@tonic-gate const gss_name_t, /* name1 */ 497*0Sstevel@tonic-gate const gss_name_t, /* name2 */ 498*0Sstevel@tonic-gate int * /* name_equal */ 499*0Sstevel@tonic-gate ); 500*0Sstevel@tonic-gate 501*0Sstevel@tonic-gate OM_uint32 gss_display_name( 502*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 503*0Sstevel@tonic-gate const gss_name_t, /* input_name */ 504*0Sstevel@tonic-gate gss_buffer_t, /* output_name_buffer */ 505*0Sstevel@tonic-gate gss_OID * /* output_name_type */ 506*0Sstevel@tonic-gate ); 507*0Sstevel@tonic-gate 508*0Sstevel@tonic-gate OM_uint32 gss_import_name( 509*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 510*0Sstevel@tonic-gate const gss_buffer_t, /* input_name_buffer */ 511*0Sstevel@tonic-gate const gss_OID, /* input_name_type */ 512*0Sstevel@tonic-gate gss_name_t * /* output_name */ 513*0Sstevel@tonic-gate ); 514*0Sstevel@tonic-gate 515*0Sstevel@tonic-gate OM_uint32 gss_export_name( 516*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 517*0Sstevel@tonic-gate const gss_name_t, /* input_name */ 518*0Sstevel@tonic-gate gss_buffer_t /* exported_name */ 519*0Sstevel@tonic-gate ); 520*0Sstevel@tonic-gate 521*0Sstevel@tonic-gate OM_uint32 gss_release_name( 522*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 523*0Sstevel@tonic-gate gss_name_t * /* input_name */ 524*0Sstevel@tonic-gate ); 525*0Sstevel@tonic-gate 526*0Sstevel@tonic-gate OM_uint32 gss_release_buffer( 527*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 528*0Sstevel@tonic-gate gss_buffer_t /* buffer */ 529*0Sstevel@tonic-gate ); 530*0Sstevel@tonic-gate 531*0Sstevel@tonic-gate OM_uint32 gss_release_oid_set( 532*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 533*0Sstevel@tonic-gate gss_OID_set * /* set */ 534*0Sstevel@tonic-gate ); 535*0Sstevel@tonic-gate 536*0Sstevel@tonic-gate OM_uint32 gss_inquire_cred( 537*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 538*0Sstevel@tonic-gate const gss_cred_id_t, /* cred_handle */ 539*0Sstevel@tonic-gate gss_name_t *, /* name */ 540*0Sstevel@tonic-gate OM_uint32 *, /* lifetime */ 541*0Sstevel@tonic-gate gss_cred_usage_t *, /* cred_usage */ 542*0Sstevel@tonic-gate gss_OID_set * /* mechanisms */ 543*0Sstevel@tonic-gate ); 544*0Sstevel@tonic-gate 545*0Sstevel@tonic-gate OM_uint32 gss_inquire_context( 546*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 547*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 548*0Sstevel@tonic-gate gss_name_t *, /* src_name */ 549*0Sstevel@tonic-gate gss_name_t *, /* targ_name */ 550*0Sstevel@tonic-gate OM_uint32 *, /* lifetime_rec */ 551*0Sstevel@tonic-gate gss_OID *, /* mech_type */ 552*0Sstevel@tonic-gate OM_uint32 *, /* ctx_flags */ 553*0Sstevel@tonic-gate int *, /* locally_initiated */ 554*0Sstevel@tonic-gate int * /* open */ 555*0Sstevel@tonic-gate ); 556*0Sstevel@tonic-gate 557*0Sstevel@tonic-gate OM_uint32 gss_wrap_size_limit( 558*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 559*0Sstevel@tonic-gate const gss_ctx_id_t, /* context_handle */ 560*0Sstevel@tonic-gate int, /* conf_req_flag */ 561*0Sstevel@tonic-gate gss_qop_t, /* qop_req */ 562*0Sstevel@tonic-gate OM_uint32, /* req_output_size */ 563*0Sstevel@tonic-gate OM_uint32 * /* max_input_size */ 564*0Sstevel@tonic-gate ); 565*0Sstevel@tonic-gate 566*0Sstevel@tonic-gate OM_uint32 gss_add_cred( 567*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 568*0Sstevel@tonic-gate const gss_cred_id_t, /* input_cred_handle */ 569*0Sstevel@tonic-gate const gss_name_t, /* desired_name */ 570*0Sstevel@tonic-gate const gss_OID, /* desired_mech */ 571*0Sstevel@tonic-gate gss_cred_usage_t, /* cred_usage */ 572*0Sstevel@tonic-gate OM_uint32, /* initiator_time_req */ 573*0Sstevel@tonic-gate OM_uint32, /* acceptor_time_req */ 574*0Sstevel@tonic-gate gss_cred_id_t *, /* output_cred_handle */ 575*0Sstevel@tonic-gate gss_OID_set *, /* actual_mechs */ 576*0Sstevel@tonic-gate OM_uint32 *, /* initiator_time_rec */ 577*0Sstevel@tonic-gate OM_uint32 * /* acceptor_time_rec */ 578*0Sstevel@tonic-gate ); 579*0Sstevel@tonic-gate 580*0Sstevel@tonic-gate OM_uint32 gss_store_cred( 581*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 582*0Sstevel@tonic-gate const gss_cred_id_t, /* input_cred */ 583*0Sstevel@tonic-gate gss_cred_usage_t, /* cred_usage */ 584*0Sstevel@tonic-gate const gss_OID, /* desired_mech */ 585*0Sstevel@tonic-gate OM_uint32, /* overwrite_cred */ 586*0Sstevel@tonic-gate OM_uint32, /* default_cred */ 587*0Sstevel@tonic-gate gss_OID_set *, /* elements_stored */ 588*0Sstevel@tonic-gate gss_cred_usage_t * /* cred_usage_stored */ 589*0Sstevel@tonic-gate ); 590*0Sstevel@tonic-gate 591*0Sstevel@tonic-gate OM_uint32 gss_inquire_cred_by_mech( 592*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 593*0Sstevel@tonic-gate const gss_cred_id_t, /* cred_handle */ 594*0Sstevel@tonic-gate const gss_OID, /* mech_type */ 595*0Sstevel@tonic-gate gss_name_t *, /* name */ 596*0Sstevel@tonic-gate OM_uint32 *, /* initiator_lifetime */ 597*0Sstevel@tonic-gate OM_uint32 *, /* acceptor_lifetime */ 598*0Sstevel@tonic-gate gss_cred_usage_t * /* cred_usage */ 599*0Sstevel@tonic-gate ); 600*0Sstevel@tonic-gate 601*0Sstevel@tonic-gate OM_uint32 gss_export_sec_context( 602*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 603*0Sstevel@tonic-gate gss_ctx_id_t *, /* context_handle */ 604*0Sstevel@tonic-gate gss_buffer_t /* interprocess_token */ 605*0Sstevel@tonic-gate ); 606*0Sstevel@tonic-gate 607*0Sstevel@tonic-gate OM_uint32 gss_import_sec_context( 608*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 609*0Sstevel@tonic-gate const gss_buffer_t, /* interprocess_token */ 610*0Sstevel@tonic-gate gss_ctx_id_t * /* context_handle */ 611*0Sstevel@tonic-gate ); 612*0Sstevel@tonic-gate 613*0Sstevel@tonic-gate OM_uint32 gss_create_empty_oid_set( 614*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 615*0Sstevel@tonic-gate gss_OID_set * /* oid_set */ 616*0Sstevel@tonic-gate ); 617*0Sstevel@tonic-gate 618*0Sstevel@tonic-gate OM_uint32 gss_add_oid_set_member( 619*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 620*0Sstevel@tonic-gate const gss_OID, /* member_oid */ 621*0Sstevel@tonic-gate gss_OID_set * /* oid_set */ 622*0Sstevel@tonic-gate ); 623*0Sstevel@tonic-gate 624*0Sstevel@tonic-gate OM_uint32 gss_test_oid_set_member( 625*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 626*0Sstevel@tonic-gate const gss_OID, /* member */ 627*0Sstevel@tonic-gate const gss_OID_set, /* set */ 628*0Sstevel@tonic-gate int * /* present */ 629*0Sstevel@tonic-gate ); 630*0Sstevel@tonic-gate 631*0Sstevel@tonic-gate OM_uint32 gss_inquire_names_for_mech( 632*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 633*0Sstevel@tonic-gate const gss_OID, /* mechanism */ 634*0Sstevel@tonic-gate gss_OID_set * /* name_types */ 635*0Sstevel@tonic-gate ); 636*0Sstevel@tonic-gate 637*0Sstevel@tonic-gate OM_uint32 gss_inquire_mechs_for_name( 638*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 639*0Sstevel@tonic-gate const gss_name_t, /* input_name */ 640*0Sstevel@tonic-gate gss_OID_set * /* mech_types */ 641*0Sstevel@tonic-gate ); 642*0Sstevel@tonic-gate 643*0Sstevel@tonic-gate OM_uint32 gss_canonicalize_name( 644*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 645*0Sstevel@tonic-gate const gss_name_t, /* input_name */ 646*0Sstevel@tonic-gate const gss_OID, /* mech_type */ 647*0Sstevel@tonic-gate gss_name_t * /* output_name */ 648*0Sstevel@tonic-gate ); 649*0Sstevel@tonic-gate 650*0Sstevel@tonic-gate OM_uint32 gss_duplicate_name( 651*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 652*0Sstevel@tonic-gate const gss_name_t, /* src_name */ 653*0Sstevel@tonic-gate gss_name_t * /* dest_name */ 654*0Sstevel@tonic-gate ); 655*0Sstevel@tonic-gate 656*0Sstevel@tonic-gate 657*0Sstevel@tonic-gate OM_uint32 gss_release_oid( 658*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 659*0Sstevel@tonic-gate gss_OID * /* oid */ 660*0Sstevel@tonic-gate ); 661*0Sstevel@tonic-gate 662*0Sstevel@tonic-gate OM_uint32 gss_str_to_oid( 663*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 664*0Sstevel@tonic-gate const gss_buffer_t, /* oid_str */ 665*0Sstevel@tonic-gate gss_OID * /* oid */ 666*0Sstevel@tonic-gate ); 667*0Sstevel@tonic-gate 668*0Sstevel@tonic-gate OM_uint32 gss_oid_to_str( 669*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 670*0Sstevel@tonic-gate const gss_OID, /* oid */ 671*0Sstevel@tonic-gate gss_buffer_t /* oid_str */ 672*0Sstevel@tonic-gate ); 673*0Sstevel@tonic-gate 674*0Sstevel@tonic-gate 675*0Sstevel@tonic-gate /* 676*0Sstevel@tonic-gate * The following routines are obsolete variants of gss_get_mic, 677*0Sstevel@tonic-gate * gss_verify_mic, gss_wrap and gss_unwrap. They should be 678*0Sstevel@tonic-gate * provided by GSSAPI V2 implementations for backwards 679*0Sstevel@tonic-gate * compatibility with V1 applications. Distinct entrypoints 680*0Sstevel@tonic-gate * (as opposed to #defines) should be provided, both to allow 681*0Sstevel@tonic-gate * GSSAPI V1 applications to link against GSSAPI V2 implementations, 682*0Sstevel@tonic-gate * and to retain the slight parameter type differences between the 683*0Sstevel@tonic-gate * obsolete versions of these routines and their current forms. 684*0Sstevel@tonic-gate */ 685*0Sstevel@tonic-gate 686*0Sstevel@tonic-gate OM_uint32 gss_sign( 687*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 688*0Sstevel@tonic-gate gss_ctx_id_t, /* context_handle */ 689*0Sstevel@tonic-gate int, /* qop_req */ 690*0Sstevel@tonic-gate gss_buffer_t, /* message_buffer */ 691*0Sstevel@tonic-gate gss_buffer_t /* message_token */ 692*0Sstevel@tonic-gate ); 693*0Sstevel@tonic-gate 694*0Sstevel@tonic-gate OM_uint32 gss_verify( 695*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 696*0Sstevel@tonic-gate gss_ctx_id_t, /* context_handle */ 697*0Sstevel@tonic-gate gss_buffer_t, /* message_buffer */ 698*0Sstevel@tonic-gate gss_buffer_t, /* token_buffer */ 699*0Sstevel@tonic-gate int * /* qop_state */ 700*0Sstevel@tonic-gate ); 701*0Sstevel@tonic-gate 702*0Sstevel@tonic-gate OM_uint32 gss_seal( 703*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 704*0Sstevel@tonic-gate gss_ctx_id_t, /* context_handle */ 705*0Sstevel@tonic-gate int, /* conf_req_flag */ 706*0Sstevel@tonic-gate int, /* qop_req */ 707*0Sstevel@tonic-gate gss_buffer_t, /* input_message_buffer */ 708*0Sstevel@tonic-gate int *, /* conf_state */ 709*0Sstevel@tonic-gate gss_buffer_t /* output_message_buffer */ 710*0Sstevel@tonic-gate ); 711*0Sstevel@tonic-gate 712*0Sstevel@tonic-gate OM_uint32 gss_unseal( 713*0Sstevel@tonic-gate OM_uint32 *, /* minor_status */ 714*0Sstevel@tonic-gate gss_ctx_id_t, /* context_handle */ 715*0Sstevel@tonic-gate gss_buffer_t, /* input_message_buffer */ 716*0Sstevel@tonic-gate gss_buffer_t, /* output_message_buffer */ 717*0Sstevel@tonic-gate int *, /* conf_state */ 718*0Sstevel@tonic-gate int * /* qop_state */ 719*0Sstevel@tonic-gate ); 720*0Sstevel@tonic-gate 721*0Sstevel@tonic-gate 722*0Sstevel@tonic-gate #ifdef _KERNEL /* For kernel */ 723*0Sstevel@tonic-gate 724*0Sstevel@tonic-gate #include <rpc/types.h> 725*0Sstevel@tonic-gate 726*0Sstevel@tonic-gate void kgss_free_oid(gss_OID oid); 727*0Sstevel@tonic-gate 728*0Sstevel@tonic-gate OM_uint32 kgss_acquire_cred( 729*0Sstevel@tonic-gate OM_uint32 *, 730*0Sstevel@tonic-gate const gss_name_t, 731*0Sstevel@tonic-gate OM_uint32, 732*0Sstevel@tonic-gate const gss_OID_set, 733*0Sstevel@tonic-gate int, 734*0Sstevel@tonic-gate gss_cred_id_t *, 735*0Sstevel@tonic-gate gss_OID_set *, 736*0Sstevel@tonic-gate OM_uint32 *, 737*0Sstevel@tonic-gate uid_t); 738*0Sstevel@tonic-gate 739*0Sstevel@tonic-gate OM_uint32 kgss_add_cred( 740*0Sstevel@tonic-gate OM_uint32 *, 741*0Sstevel@tonic-gate gss_cred_id_t, 742*0Sstevel@tonic-gate gss_name_t, 743*0Sstevel@tonic-gate gss_OID, 744*0Sstevel@tonic-gate int, 745*0Sstevel@tonic-gate int, 746*0Sstevel@tonic-gate int, 747*0Sstevel@tonic-gate gss_OID_set *, 748*0Sstevel@tonic-gate OM_uint32 *, 749*0Sstevel@tonic-gate OM_uint32 *, 750*0Sstevel@tonic-gate uid_t); 751*0Sstevel@tonic-gate 752*0Sstevel@tonic-gate OM_uint32 kgss_release_cred( 753*0Sstevel@tonic-gate OM_uint32 *, 754*0Sstevel@tonic-gate gss_cred_id_t *, 755*0Sstevel@tonic-gate uid_t); 756*0Sstevel@tonic-gate 757*0Sstevel@tonic-gate OM_uint32 kgss_init_sec_context( 758*0Sstevel@tonic-gate OM_uint32 *, 759*0Sstevel@tonic-gate const gss_cred_id_t, 760*0Sstevel@tonic-gate gss_ctx_id_t *, 761*0Sstevel@tonic-gate const gss_name_t, 762*0Sstevel@tonic-gate const gss_OID, 763*0Sstevel@tonic-gate int, 764*0Sstevel@tonic-gate OM_uint32, 765*0Sstevel@tonic-gate const gss_channel_bindings_t, 766*0Sstevel@tonic-gate const gss_buffer_t, 767*0Sstevel@tonic-gate gss_OID *, 768*0Sstevel@tonic-gate gss_buffer_t, 769*0Sstevel@tonic-gate int *, 770*0Sstevel@tonic-gate OM_uint32 *, 771*0Sstevel@tonic-gate uid_t); 772*0Sstevel@tonic-gate 773*0Sstevel@tonic-gate OM_uint32 kgss_accept_sec_context( 774*0Sstevel@tonic-gate OM_uint32 *, 775*0Sstevel@tonic-gate gss_ctx_id_t *, 776*0Sstevel@tonic-gate const gss_cred_id_t, 777*0Sstevel@tonic-gate const gss_buffer_t, 778*0Sstevel@tonic-gate const gss_channel_bindings_t, 779*0Sstevel@tonic-gate const gss_buffer_t, 780*0Sstevel@tonic-gate gss_OID *, 781*0Sstevel@tonic-gate gss_buffer_t, 782*0Sstevel@tonic-gate int *, 783*0Sstevel@tonic-gate OM_uint32 *, 784*0Sstevel@tonic-gate gss_cred_id_t *, 785*0Sstevel@tonic-gate uid_t); 786*0Sstevel@tonic-gate 787*0Sstevel@tonic-gate OM_uint32 kgss_process_context_token( 788*0Sstevel@tonic-gate OM_uint32 *, 789*0Sstevel@tonic-gate const gss_ctx_id_t, 790*0Sstevel@tonic-gate const gss_buffer_t, 791*0Sstevel@tonic-gate uid_t); 792*0Sstevel@tonic-gate 793*0Sstevel@tonic-gate OM_uint32 kgss_delete_sec_context( 794*0Sstevel@tonic-gate OM_uint32 *, 795*0Sstevel@tonic-gate gss_ctx_id_t *, 796*0Sstevel@tonic-gate gss_buffer_t); 797*0Sstevel@tonic-gate 798*0Sstevel@tonic-gate OM_uint32 kgss_export_sec_context( 799*0Sstevel@tonic-gate OM_uint32 *, 800*0Sstevel@tonic-gate const gss_ctx_id_t, 801*0Sstevel@tonic-gate gss_buffer_t); 802*0Sstevel@tonic-gate 803*0Sstevel@tonic-gate OM_uint32 kgss_import_sec_context( 804*0Sstevel@tonic-gate OM_uint32 *, 805*0Sstevel@tonic-gate const gss_buffer_t, 806*0Sstevel@tonic-gate gss_ctx_id_t); 807*0Sstevel@tonic-gate 808*0Sstevel@tonic-gate OM_uint32 kgss_context_time( 809*0Sstevel@tonic-gate OM_uint32 *, 810*0Sstevel@tonic-gate const gss_ctx_id_t, 811*0Sstevel@tonic-gate OM_uint32 *, 812*0Sstevel@tonic-gate uid_t); 813*0Sstevel@tonic-gate 814*0Sstevel@tonic-gate OM_uint32 kgss_sign( 815*0Sstevel@tonic-gate OM_uint32 *, 816*0Sstevel@tonic-gate const gss_ctx_id_t, 817*0Sstevel@tonic-gate int, 818*0Sstevel@tonic-gate const gss_buffer_t, 819*0Sstevel@tonic-gate gss_buffer_t); 820*0Sstevel@tonic-gate 821*0Sstevel@tonic-gate 822*0Sstevel@tonic-gate OM_uint32 kgss_verify( 823*0Sstevel@tonic-gate OM_uint32 *, 824*0Sstevel@tonic-gate const gss_ctx_id_t, 825*0Sstevel@tonic-gate const gss_buffer_t, 826*0Sstevel@tonic-gate const gss_buffer_t, 827*0Sstevel@tonic-gate int *); 828*0Sstevel@tonic-gate 829*0Sstevel@tonic-gate OM_uint32 kgss_seal( 830*0Sstevel@tonic-gate OM_uint32 *, 831*0Sstevel@tonic-gate const gss_ctx_id_t, 832*0Sstevel@tonic-gate int, 833*0Sstevel@tonic-gate int, 834*0Sstevel@tonic-gate const gss_buffer_t, 835*0Sstevel@tonic-gate int *, 836*0Sstevel@tonic-gate gss_buffer_t); 837*0Sstevel@tonic-gate 838*0Sstevel@tonic-gate OM_uint32 kgss_unseal( 839*0Sstevel@tonic-gate OM_uint32 *, 840*0Sstevel@tonic-gate const gss_ctx_id_t, 841*0Sstevel@tonic-gate const gss_buffer_t, 842*0Sstevel@tonic-gate gss_buffer_t, 843*0Sstevel@tonic-gate int *, 844*0Sstevel@tonic-gate int *); 845*0Sstevel@tonic-gate 846*0Sstevel@tonic-gate OM_uint32 kgss_display_status( 847*0Sstevel@tonic-gate OM_uint32 *, 848*0Sstevel@tonic-gate OM_uint32, 849*0Sstevel@tonic-gate int, 850*0Sstevel@tonic-gate const gss_OID, 851*0Sstevel@tonic-gate int *, 852*0Sstevel@tonic-gate gss_buffer_t, 853*0Sstevel@tonic-gate uid_t); 854*0Sstevel@tonic-gate 855*0Sstevel@tonic-gate OM_uint32 kgss_indicate_mechs( 856*0Sstevel@tonic-gate OM_uint32 *, 857*0Sstevel@tonic-gate gss_OID_set *, 858*0Sstevel@tonic-gate uid_t); 859*0Sstevel@tonic-gate 860*0Sstevel@tonic-gate OM_uint32 kgss_inquire_cred( 861*0Sstevel@tonic-gate OM_uint32 *, 862*0Sstevel@tonic-gate const gss_cred_id_t, 863*0Sstevel@tonic-gate gss_name_t *, 864*0Sstevel@tonic-gate OM_uint32 *, 865*0Sstevel@tonic-gate int *, 866*0Sstevel@tonic-gate gss_OID_set *, 867*0Sstevel@tonic-gate uid_t); 868*0Sstevel@tonic-gate 869*0Sstevel@tonic-gate OM_uint32 kgss_inquire_cred_by_mech( 870*0Sstevel@tonic-gate OM_uint32 *, 871*0Sstevel@tonic-gate gss_cred_id_t, 872*0Sstevel@tonic-gate gss_OID, 873*0Sstevel@tonic-gate uid_t); 874*0Sstevel@tonic-gate 875*0Sstevel@tonic-gate 876*0Sstevel@tonic-gate #endif /* if _KERNEL */ 877*0Sstevel@tonic-gate 878*0Sstevel@tonic-gate #ifdef __cplusplus 879*0Sstevel@tonic-gate } 880*0Sstevel@tonic-gate #endif 881*0Sstevel@tonic-gate 882*0Sstevel@tonic-gate #endif /* _GSSAPI_H_ */ 883