Back to index

lightning-sunbird  0.9+nobinonly
gssapi.h
Go to the documentation of this file.
00001 /* vim:set ts=4 sw=4 sts=4 et cindent: */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Copyright 1993 by OpenVision Technologies, Inc.
00004  * 
00005  * Permission to use, copy, modify, distribute, and sell this software
00006  * and its documentation for any purpose is hereby granted without fee,
00007  * provided that the above copyright notice appears in all copies and
00008  * that both that copyright notice and this permission notice appear in
00009  * supporting documentation, and that the name of OpenVision not be used
00010  * in advertising or publicity pertaining to distribution of the software
00011  * without specific, written prior permission. OpenVision makes no
00012  * representations about the suitability of this software for any
00013  * purpose.  It is provided "as is" without express or implied warranty.
00014  * 
00015  * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
00016  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
00017  * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
00018  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
00019  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
00020  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00021  * PERFORMANCE OF THIS SOFTWARE.
00022  ****** END LICENSE BLOCK ***** */
00023 
00024 #ifndef GSSAPI_H_
00025 #define GSSAPI_H_
00026 
00027 /*
00028  * Also define _GSSAPI_H_ as that is what the Kerberos 5 code defines and
00029  * what header files on some systems look for.
00030  */
00031 #define _GSSAPI_H_
00032 
00033 /*
00034  * On Mac OS X, Kerberos/Kerberos.h is used to gain access to certain
00035  * system-specific Kerberos functions, but on 10.4, that file also brings
00036  * in other headers that conflict with this one.
00037  */
00038 #define _GSSAPI_GENERIC_H_
00039 #define _GSSAPI_KRB5_H_
00040 
00041 /* 
00042  * Define windows specific needed parameters.
00043  */
00044 
00045 #ifndef GSS_CALLCONV
00046 #if defined(_WIN32)
00047 #define GSS_CALLCONV __stdcall
00048 #define GSS_CALLCONV_C __cdecl
00049 #else
00050 #define GSS_CALLCONV 
00051 #define GSS_CALLCONV_C
00052 #endif
00053 #endif /* GSS_CALLCONV */
00054 
00055 #ifdef GSS_USE_FUNCTION_POINTERS
00056 #ifdef _WIN32
00057 #undef GSS_CALLCONV
00058 #define GSS_CALLCONV
00059 #define GSS_FUNC(f) (__stdcall *f##_type)
00060 #else
00061 #define GSS_FUNC(f) (*f##_type)
00062 #endif
00063 #define GSS_MAKE_TYPEDEF typedef
00064 #else
00065 #define GSS_FUNC(f) f
00066 #define GSS_MAKE_TYPEDEF
00067 #endif
00068 
00069 /*
00070  * First, include stddef.h to get size_t defined.
00071  */
00072 #include <stddef.h>
00073 
00074 /*
00075  * Configure set the following
00076  */
00077 
00078 #ifndef SIZEOF_LONG
00079 #undef SIZEOF_LONG 
00080 #endif
00081 #ifndef SIZEOF_SHORT
00082 #undef SIZEOF_SHORT
00083 #endif
00084 
00085 #ifndef EXTERN_C_BEGIN
00086 #ifdef __cplusplus
00087 #define EXTERN_C_BEGIN extern "C" {
00088 #define EXTERN_C_END }
00089 #else
00090 #define EXTERN_C_BEGIN
00091 #define EXTERN_C_END
00092 #endif
00093 #endif
00094 
00095 EXTERN_C_BEGIN
00096 
00097 /*
00098  * If the platform supports the xom.h header file, it should be
00099  * included here.
00100  */
00101 /* #include <xom.h> */
00102 
00103 
00104 /*
00105  * Now define the three implementation-dependent types.
00106  */
00107 
00108 typedef void * gss_name_t ;
00109 typedef void * gss_ctx_id_t ;
00110 typedef void * gss_cred_id_t ;
00111  
00112 
00113 /*
00114  * The following type must be defined as the smallest natural
00115  * unsigned integer supported by the platform that has at least
00116  * 32 bits of precision.
00117  */
00118 
00119 #if SIZEOF_LONG == 4
00120 typedef unsigned long gss_uint32;
00121 #elif SIZEOF_SHORT == 4
00122 typedef unsigned short gss_uint32;
00123 #else
00124 typedef unsigned int gss_uint32;
00125 #endif
00126 
00127 #ifdef OM_STRING
00128 
00129 /*
00130  * We have included the xom.h header file.  Verify that OM_uint32
00131  * is defined correctly.
00132  */
00133 
00134 #if sizeof(gss_uint32) != sizeof(OM_uint32)
00135 #error Incompatible definition of OM_uint32 from xom.h
00136 #endif
00137 
00138 typedef OM_object_identifier gss_OID_desc, *gss_OID;
00139 
00140 #else /* !OM_STRING */
00141 
00142 /*
00143  * We can't use X/Open definitions, so roll our own.               
00144  */
00145 typedef gss_uint32 OM_uint32;
00146 typedef struct gss_OID_desc_struct {
00147   OM_uint32 length;
00148   void *elements;
00149 } gss_OID_desc, *gss_OID;
00150 
00151 #endif /* !OM_STRING */
00152 
00153 typedef struct gss_OID_set_desc_struct  {
00154   size_t     count;
00155   gss_OID    elements;
00156 } gss_OID_set_desc, *gss_OID_set;
00157 
00158 
00159 /*
00160  * For now, define a QOP-type as an OM_uint32
00161  */
00162 typedef OM_uint32 gss_qop_t;
00163 
00164 typedef int gss_cred_usage_t;
00165 
00166 
00167 typedef struct gss_buffer_desc_struct {
00168   size_t length;
00169   void *value;
00170 } gss_buffer_desc, *gss_buffer_t;
00171 
00172 typedef struct gss_channel_bindings_struct {
00173   OM_uint32 initiator_addrtype;
00174   gss_buffer_desc initiator_address;
00175   OM_uint32 acceptor_addrtype;
00176   gss_buffer_desc acceptor_address;
00177   gss_buffer_desc application_data;
00178 } *gss_channel_bindings_t;
00179 
00180 
00181 /*
00182  * Flag bits for context-level services.
00183  */
00184 #define GSS_C_DELEG_FLAG 1
00185 #define GSS_C_MUTUAL_FLAG 2
00186 #define GSS_C_REPLAY_FLAG 4
00187 #define GSS_C_SEQUENCE_FLAG 8
00188 #define GSS_C_CONF_FLAG 16
00189 #define GSS_C_INTEG_FLAG 32
00190 #define GSS_C_ANON_FLAG 64
00191 #define GSS_C_PROT_READY_FLAG 128
00192 #define GSS_C_TRANS_FLAG 256
00193 
00194 /*
00195  * Credential usage options
00196  */
00197 #define GSS_C_BOTH 0
00198 #define GSS_C_INITIATE 1
00199 #define GSS_C_ACCEPT 2
00200 
00201 /*
00202  * Status code types for gss_display_status
00203  */
00204 #define GSS_C_GSS_CODE 1
00205 #define GSS_C_MECH_CODE 2
00206 
00207 /*
00208  * The constant definitions for channel-bindings address families
00209  */
00210 #define GSS_C_AF_UNSPEC     0
00211 #define GSS_C_AF_LOCAL      1
00212 #define GSS_C_AF_INET       2
00213 #define GSS_C_AF_IMPLINK    3
00214 #define GSS_C_AF_PUP        4
00215 #define GSS_C_AF_CHAOS      5
00216 #define GSS_C_AF_NS         6
00217 #define GSS_C_AF_NBS        7
00218 #define GSS_C_AF_ECMA       8
00219 #define GSS_C_AF_DATAKIT    9
00220 #define GSS_C_AF_CCITT      10
00221 #define GSS_C_AF_SNA        11
00222 #define GSS_C_AF_DECnet     12
00223 #define GSS_C_AF_DLI        13
00224 #define GSS_C_AF_LAT        14
00225 #define GSS_C_AF_HYLINK     15
00226 #define GSS_C_AF_APPLETALK  16
00227 #define GSS_C_AF_BSC        17
00228 #define GSS_C_AF_DSS        18
00229 #define GSS_C_AF_OSI        19
00230 #define GSS_C_AF_X25        21
00231 
00232 #define GSS_C_AF_NULLADDR   255
00233 
00234 /*
00235  * Various Null values
00236  */
00237 #define GSS_C_NO_NAME ((gss_name_t) 0)
00238 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
00239 #define GSS_C_NO_OID ((gss_OID) 0)
00240 #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
00241 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
00242 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
00243 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
00244 #define GSS_C_EMPTY_BUFFER {0, NULL}
00245 
00246 /*
00247  * Some alternate names for a couple of the above
00248  * values.  These are defined for V1 compatibility.
00249  */
00250 #define GSS_C_NULL_OID GSS_C_NO_OID
00251 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
00252 
00253 /*
00254  * Define the default Quality of Protection for per-message
00255  * services.  Note that an implementation that offers multiple
00256  * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
00257  * (as done here) to mean "default protection", or to a specific
00258  * explicit QOP value.  However, a value of 0 should always be
00259  * interpreted by a GSSAPI implementation as a request for the
00260  * default protection level.
00261  */
00262 #define GSS_C_QOP_DEFAULT 0
00263 
00264 /*
00265  * Expiration time of 2^32-1 seconds means infinite lifetime for a
00266  * credential or security context
00267  */
00268 #define GSS_C_INDEFINITE 0xfffffffful
00269 
00270 /*
00271  * The implementation must reserve static storage for a
00272  * gss_OID_desc object containing the value
00273  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00274  *              "\x01\x02\x01\x01"},
00275  * corresponding to an object-identifier value of
00276  * {iso(1) member-body(2) United States(840) mit(113554)
00277  *  infosys(1) gssapi(2) generic(1) user_name(1)}.  The constant
00278  * GSS_C_NT_USER_NAME should be initialized to point
00279  * to that gss_OID_desc.
00280  */
00281 extern gss_OID GSS_C_NT_USER_NAME;
00282 
00283 /*
00284  * The implementation must reserve static storage for a
00285  * gss_OID_desc object containing the value
00286  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00287  *              "\x01\x02\x01\x02"},
00288  * corresponding to an object-identifier value of
00289  * {iso(1) member-body(2) United States(840) mit(113554)
00290  *  infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
00291  * The constant GSS_C_NT_MACHINE_UID_NAME should be
00292  * initialized to point to that gss_OID_desc.
00293  */
00294 extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
00295 
00296 /*
00297  * The implementation must reserve static storage for a
00298  * gss_OID_desc object containing the value
00299  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00300  *              "\x01\x02\x01\x03"},
00301  * corresponding to an object-identifier value of
00302  * {iso(1) member-body(2) United States(840) mit(113554)
00303  *  infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
00304  * The constant GSS_C_NT_STRING_UID_NAME should be
00305  * initialized to point to that gss_OID_desc.
00306  */
00307 extern gss_OID GSS_C_NT_STRING_UID_NAME;
00308 
00309 /*
00310  * The implementation must reserve static storage for a
00311  * gss_OID_desc object containing the value
00312  * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
00313  * corresponding to an object-identifier value of
00314  * {iso(1) org(3) dod(6) internet(1) security(5)
00315  * nametypes(6) gss-host-based-services(2)).  The constant
00316  * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
00317  * to that gss_OID_desc.  This is a deprecated OID value, and
00318  * implementations wishing to support hostbased-service names
00319  * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
00320  * defined below, to identify such names; 
00321  * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym 
00322  * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
00323  * parameter, but should not be emitted by GSSAPI 
00324  * implementations
00325  */
00326 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
00327 
00328 /*
00329  * The implementation must reserve static storage for a
00330  * gss_OID_desc object containing the value
00331  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00332  *              "\x01\x02\x01\x04"}, corresponding to an 
00333  * object-identifier value of {iso(1) member-body(2) 
00334  * Unites States(840) mit(113554) infosys(1) gssapi(2) 
00335  * generic(1) service_name(4)}.  The constant
00336  * GSS_C_NT_HOSTBASED_SERVICE should be initialized 
00337  * to point to that gss_OID_desc.  
00338  */
00339 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
00340 
00341 
00342 /*
00343  * The implementation must reserve static storage for a
00344  * gss_OID_desc object containing the value
00345  * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
00346  * corresponding to an object identifier value of
00347  * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
00348  * 6(nametypes), 3(gss-anonymous-name)}.  The constant
00349  * and GSS_C_NT_ANONYMOUS should be initialized to point
00350  * to that gss_OID_desc.
00351  */
00352 extern gss_OID GSS_C_NT_ANONYMOUS;
00353 
00354 /*
00355  * The implementation must reserve static storage for a
00356  * gss_OID_desc object containing the value
00357  * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
00358  * corresponding to an object-identifier value of
00359  * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
00360  * 6(nametypes), 4(gss-api-exported-name)}.  The constant
00361  * GSS_C_NT_EXPORT_NAME should be initialized to point
00362  * to that gss_OID_desc.
00363  */
00364 extern gss_OID GSS_C_NT_EXPORT_NAME;
00365 
00366 /* Major status codes */
00367 
00368 #define GSS_S_COMPLETE 0
00369 
00370 /*
00371  * Some "helper" definitions to make the status code macros obvious.
00372  */
00373 #define GSS_C_CALLING_ERROR_OFFSET 24
00374 #define GSS_C_ROUTINE_ERROR_OFFSET 16
00375 #define GSS_C_SUPPLEMENTARY_OFFSET 0
00376 #define GSS_C_CALLING_ERROR_MASK 0377ul
00377 #define GSS_C_ROUTINE_ERROR_MASK 0377ul
00378 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul
00379 
00380 /*
00381  * The macros that test status codes for error conditions.
00382  * Note that the GSS_ERROR() macro has changed slightly from
00383  * the V1 GSSAPI so that it now evaluates its argument
00384  * only once.
00385  */
00386 #define GSS_CALLING_ERROR(x) \
00387 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
00388 #define GSS_ROUTINE_ERROR(x) \
00389      (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
00390 #define GSS_SUPPLEMENTARY_INFO(x) \
00391      (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
00392 #define GSS_ERROR(x) \
00393      (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
00394            (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
00395 
00396 /*
00397  * Now the actual status code definitions
00398  */
00399 
00400 /*
00401  * Calling errors:
00402  */
00403 #define GSS_S_CALL_INACCESSIBLE_READ \
00404      (1ul << GSS_C_CALLING_ERROR_OFFSET)
00405 #define GSS_S_CALL_INACCESSIBLE_WRITE \
00406      (2ul << GSS_C_CALLING_ERROR_OFFSET)
00407 #define GSS_S_CALL_BAD_STRUCTURE \
00408      (3ul << GSS_C_CALLING_ERROR_OFFSET)
00409 
00410 /*
00411  * Routine errors:
00412  */
00413 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
00414 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
00415 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
00416 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
00417 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
00418 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
00419 #define GSS_S_BAD_MIC GSS_S_BAD_SIG
00420 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
00421 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
00422 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
00423 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
00424 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
00425 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
00426 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
00427 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
00428 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
00429 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
00430 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
00431 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
00432 
00433 /*
00434  * Supplementary info bits:
00435  */
00436 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
00437 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
00438 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
00439 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
00440 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
00441 
00442 /*
00443  * Finally, function prototypes for the GSS-API routines.
00444  */
00445 
00446 GSS_MAKE_TYPEDEF
00447 OM_uint32 
00448 GSS_CALLCONV GSS_FUNC(gss_acquire_cred)
00449 (OM_uint32 *,             /*  minor_status */
00450  const gss_name_t,        /* desired_name */
00451  OM_uint32,               /* time_req */
00452  const gss_OID_set,       /* desired_mechs */
00453  gss_cred_usage_t,        /* cred_usage */
00454  gss_cred_id_t *,         /* output_cred_handle */
00455  gss_OID_set *,           /* actual_mechs */
00456  OM_uint32 *              /* time_rec */
00457  );
00458 
00459 GSS_MAKE_TYPEDEF
00460 OM_uint32 
00461 GSS_CALLCONV GSS_FUNC(gss_release_cred)
00462 (OM_uint32 *,             /* minor_status */
00463  gss_cred_id_t *          /* cred_handle */
00464  );
00465 
00466 GSS_MAKE_TYPEDEF
00467 OM_uint32 
00468 GSS_CALLCONV GSS_FUNC(gss_init_sec_context)
00469 (OM_uint32 *,             /* minor_status */
00470  const gss_cred_id_t,     /* initiator_cred_handle */
00471  gss_ctx_id_t *,          /* context_handle */
00472  const gss_name_t,        /* target_name */
00473  const gss_OID,           /* mech_type */
00474  OM_uint32,               /* req_flags */
00475  OM_uint32,               /* time_req */
00476  const gss_channel_bindings_t, /* input_chan_bindings */
00477  const gss_buffer_t,      /* input_token */
00478  gss_OID *,               /* actual_mech_type */
00479  gss_buffer_t,            /* output_token */
00480  OM_uint32 *,             /* ret_flags */
00481  OM_uint32 *              /* time_rec */
00482  );
00483 
00484 GSS_MAKE_TYPEDEF
00485 OM_uint32 
00486 GSS_CALLCONV GSS_FUNC(gss_accept_sec_context)
00487 (OM_uint32 *,             /* minor_status */
00488  gss_ctx_id_t *,          /* context_handle */
00489  const gss_cred_id_t,     /* acceptor_cred_handle */
00490  const gss_buffer_t,      /* input_token_buffer */
00491  const gss_channel_bindings_t, /* input_chan_bindings */
00492  gss_name_t *,            /* src_name */
00493  gss_OID *,               /* mech_type */
00494  gss_buffer_t,            /* output_token */
00495  OM_uint32 *,             /* ret_flags */
00496  OM_uint32 *,             /* time_rec */
00497  gss_cred_id_t *          /* delegated_cred_handle */
00498               );
00499 
00500 GSS_MAKE_TYPEDEF
00501 OM_uint32 
00502 GSS_CALLCONV GSS_FUNC(gss_process_context_token)
00503 (OM_uint32 *,             /* minor_status */
00504  const gss_ctx_id_t,      /* context_handle */
00505  const gss_buffer_t       /* token_buffer */
00506  );
00507 
00508 GSS_MAKE_TYPEDEF
00509 OM_uint32 
00510 GSS_CALLCONV GSS_FUNC(gss_delete_sec_context)
00511 (OM_uint32 *,             /* minor_status */
00512  gss_ctx_id_t *,          /* context_handle */
00513  gss_buffer_t             /* output_token */
00514  );
00515 
00516 GSS_MAKE_TYPEDEF
00517 OM_uint32
00518 GSS_CALLCONV GSS_FUNC(gss_context_time)
00519 (OM_uint32 *,             /* minor_status */
00520  const gss_ctx_id_t,      /* context_handle */
00521  OM_uint32 *              /* time_rec */
00522  );
00523 
00524 GSS_MAKE_TYPEDEF
00525 OM_uint32 
00526 GSS_CALLCONV GSS_FUNC(gss_get_mic)
00527 (OM_uint32 *,             /* minor_status */
00528  const gss_ctx_id_t,      /* context_handle */
00529  gss_qop_t,               /* qop_req */
00530  const gss_buffer_t,      /* message_buffer */
00531  gss_buffer_t             /* message_token */
00532  );
00533 
00534 
00535 GSS_MAKE_TYPEDEF
00536 OM_uint32 
00537 GSS_CALLCONV GSS_FUNC(gss_verify_mic)
00538 (OM_uint32 *,             /* minor_status */
00539  const gss_ctx_id_t,      /* context_handle */
00540  const gss_buffer_t,      /* message_buffer */
00541  const gss_buffer_t,      /* token_buffer */
00542  gss_qop_t *              /* qop_state */
00543  );
00544 
00545 GSS_MAKE_TYPEDEF
00546 OM_uint32 
00547 GSS_CALLCONV GSS_FUNC(gss_wrap)
00548 (OM_uint32 *,             /* minor_status */
00549  const gss_ctx_id_t,      /* context_handle */
00550  int,                     /* conf_req_flag */
00551  gss_qop_t,               /* qop_req */
00552  const gss_buffer_t,      /* input_message_buffer */
00553  int *,                   /* conf_state */
00554  gss_buffer_t             /* output_message_buffer */
00555  );
00556 
00557 
00558 GSS_MAKE_TYPEDEF
00559 OM_uint32 
00560 GSS_CALLCONV GSS_FUNC(gss_unwrap)
00561 (OM_uint32 *,             /* minor_status */
00562  const gss_ctx_id_t,      /* context_handle */
00563  const gss_buffer_t,      /* input_message_buffer */
00564  gss_buffer_t,            /* output_message_buffer */
00565  int *,                   /* conf_state */
00566  gss_qop_t *              /* qop_state */
00567  );
00568 
00569 GSS_MAKE_TYPEDEF
00570 OM_uint32 
00571 GSS_CALLCONV GSS_FUNC(gss_display_status)
00572 (OM_uint32 *,             /* minor_status */
00573  OM_uint32,               /* status_value */
00574  int,                     /* status_type */
00575  const gss_OID,           /* mech_type */
00576  OM_uint32 *,             /* message_context */
00577  gss_buffer_t             /* status_string */
00578  );
00579 
00580 GSS_MAKE_TYPEDEF
00581 OM_uint32 
00582 GSS_CALLCONV GSS_FUNC(gss_indicate_mechs)
00583 (OM_uint32 *,             /* minor_status */
00584  gss_OID_set *            /* mech_set */
00585  );
00586 
00587 GSS_MAKE_TYPEDEF
00588 OM_uint32 
00589 GSS_CALLCONV GSS_FUNC(gss_compare_name)
00590 (OM_uint32 *,             /* minor_status */
00591  const gss_name_t,        /* name1 */
00592  const gss_name_t,        /* name2 */
00593  int *                    /* name_equal */
00594  );
00595 
00596 GSS_MAKE_TYPEDEF
00597 OM_uint32 
00598 GSS_CALLCONV GSS_FUNC(gss_display_name)
00599 (OM_uint32 *,             /* minor_status */
00600  const gss_name_t,        /* input_name */
00601  gss_buffer_t,            /* output_name_buffer */
00602  gss_OID *                /* output_name_type */
00603  );
00604 
00605 GSS_MAKE_TYPEDEF
00606 OM_uint32 
00607 GSS_CALLCONV GSS_FUNC(gss_import_name)
00608 (OM_uint32 *,             /* minor_status */
00609  const gss_buffer_t,      /* input_name_buffer */
00610  const gss_OID,           /* input_name_type */
00611  gss_name_t *             /* output_name */
00612  );
00613 
00614 GSS_MAKE_TYPEDEF
00615 OM_uint32 
00616 GSS_CALLCONV GSS_FUNC(gss_export_name)
00617 (OM_uint32  *,            /* minor_status */
00618  const gss_name_t,        /* input_name */
00619  gss_buffer_t             /* exported_name */
00620  );
00621 
00622 GSS_MAKE_TYPEDEF
00623 OM_uint32 
00624 GSS_CALLCONV GSS_FUNC(gss_release_name)
00625 (OM_uint32 *,             /* minor_status */
00626  gss_name_t *             /* input_name */
00627  );
00628 
00629 GSS_MAKE_TYPEDEF
00630 OM_uint32 
00631 GSS_CALLCONV GSS_FUNC(gss_release_buffer)
00632 (OM_uint32 *,             /* minor_status */
00633  gss_buffer_t             /* buffer */
00634  );
00635 
00636 GSS_MAKE_TYPEDEF
00637 OM_uint32 
00638 GSS_CALLCONV GSS_FUNC(gss_release_oid_set)
00639 (OM_uint32 *,             /* minor_status */
00640  gss_OID_set *            /* set */
00641  );
00642 
00643 GSS_MAKE_TYPEDEF
00644 OM_uint32 
00645 GSS_CALLCONV GSS_FUNC(gss_inquire_cred)
00646 (OM_uint32 *,             /* minor_status */
00647  const gss_cred_id_t,     /* cred_handle */
00648  gss_name_t *,            /* name */
00649  OM_uint32 *,             /* lifetime */
00650  gss_cred_usage_t *,      /* cred_usage */
00651  gss_OID_set *            /* mechanisms */
00652  );
00653 
00654 GSS_MAKE_TYPEDEF
00655 OM_uint32 
00656 GSS_CALLCONV GSS_FUNC(gss_inquire_context)
00657 (OM_uint32 *,             /* minor_status */
00658  const gss_ctx_id_t,      /* context_handle */
00659  gss_name_t *,            /* src_name */
00660  gss_name_t *,            /* targ_name */
00661  OM_uint32 *,             /* lifetime_rec */
00662  gss_OID *,               /* mech_type */
00663  OM_uint32 *,             /* ctx_flags */
00664  int *,                   /* locally_initiated */
00665  int *                    /* open */
00666  );
00667 
00668 GSS_MAKE_TYPEDEF
00669 OM_uint32 
00670 GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit) 
00671 (OM_uint32 *,             /* minor_status */
00672  const gss_ctx_id_t,      /* context_handle */
00673  int,                     /* conf_req_flag */
00674  gss_qop_t,               /* qop_req */
00675  OM_uint32,               /* req_output_size */
00676  OM_uint32 *              /* max_input_size */
00677  );
00678 
00679 GSS_MAKE_TYPEDEF
00680 OM_uint32 
00681 GSS_CALLCONV GSS_FUNC(gss_add_cred) 
00682 (OM_uint32 *,             /* minor_status */
00683  const gss_cred_id_t,     /* input_cred_handle */
00684  const gss_name_t,        /* desired_name */
00685  const gss_OID,           /* desired_mech */
00686  gss_cred_usage_t,        /* cred_usage */
00687  OM_uint32,               /* initiator_time_req */
00688  OM_uint32,               /* acceptor_time_req */
00689  gss_cred_id_t *,         /* output_cred_handle */
00690  gss_OID_set *,           /* actual_mechs */
00691  OM_uint32 *,             /* initiator_time_rec */
00692  OM_uint32 *              /* acceptor_time_rec */
00693  );
00694 
00695 GSS_MAKE_TYPEDEF
00696 OM_uint32 
00697 GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech) 
00698 (OM_uint32 *,             /* minor_status */
00699  const gss_cred_id_t,     /* cred_handle */
00700  const gss_OID,           /* mech_type */
00701  gss_name_t *,            /* name */
00702  OM_uint32 *,             /* initiator_lifetime */
00703  OM_uint32 *,             /* acceptor_lifetime */
00704  gss_cred_usage_t *       /* cred_usage */
00705  );
00706 
00707 GSS_MAKE_TYPEDEF
00708 OM_uint32 
00709 GSS_CALLCONV GSS_FUNC(gss_export_sec_context)
00710 (OM_uint32 *,             /* minor_status */
00711  gss_ctx_id_t *,          /* context_handle */
00712  gss_buffer_t             /* interprocess_token */
00713  );
00714 
00715 GSS_MAKE_TYPEDEF
00716 OM_uint32 
00717 GSS_CALLCONV GSS_FUNC(gss_import_sec_context)
00718 (OM_uint32 *,             /* minor_status */
00719  const gss_buffer_t,      /* interprocess_token */
00720  gss_ctx_id_t *           /* context_handle */
00721  );
00722 
00723 GSS_MAKE_TYPEDEF
00724 OM_uint32 
00725 GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set)
00726 (OM_uint32 *,             /* minor_status */
00727  gss_OID_set *            /* oid_set */
00728  );
00729 
00730 GSS_MAKE_TYPEDEF
00731 OM_uint32 
00732 GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member)
00733 (OM_uint32 *,             /* minor_status */
00734  const gss_OID,           /* member_oid */
00735  gss_OID_set *            /* oid_set */
00736  );
00737 
00738 GSS_MAKE_TYPEDEF
00739 OM_uint32 
00740 GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member)
00741 (OM_uint32 *,             /* minor_status */
00742  const gss_OID,           /* member */
00743  const gss_OID_set,       /* set */
00744  int *                    /* present */
00745  );
00746 
00747 GSS_MAKE_TYPEDEF
00748 OM_uint32 
00749 GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech)
00750 (OM_uint32 *,             /* minor_status */
00751  const gss_OID,           /* mechanism */
00752  gss_OID_set *            /* name_types */
00753  );
00754 
00755 GSS_MAKE_TYPEDEF
00756 OM_uint32 
00757 GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name)
00758 (OM_uint32 *,             /* minor_status */
00759  const gss_name_t,        /* input_name */
00760  gss_OID_set *            /* mech_types */
00761  );
00762 
00763 GSS_MAKE_TYPEDEF
00764 OM_uint32 
00765 GSS_CALLCONV GSS_FUNC(gss_canonicalize_name)
00766 (OM_uint32 *,             /* minor_status */
00767  const gss_name_t,        /* input_name */
00768  const gss_OID,           /* mech_type */
00769  gss_name_t *             /* output_name */
00770  );
00771 
00772 GSS_MAKE_TYPEDEF
00773 OM_uint32 
00774 GSS_CALLCONV GSS_FUNC(gss_duplicate_name)
00775 (OM_uint32 *,             /* minor_status */
00776  const gss_name_t,        /* src_name */
00777  gss_name_t *             /* dest_name */
00778  );
00779 
00780    /*
00781     * The following routines are obsolete variants of gss_get_mic,
00782     * gss_verify_mic, gss_wrap and gss_unwrap.  They should be
00783     * provided by GSSAPI V2 implementations for backwards
00784     * compatibility with V1 applications.  Distinct entrypoints
00785     * (as opposed to #defines) should be provided, both to allow
00786     * GSSAPI V1 applications to link against GSSAPI V2 implementations,
00787     * and to retain the slight parameter type differences between the
00788     * obsolete versions of these routines and their current forms.
00789     */
00790 
00791    GSS_MAKE_TYPEDEF
00792    OM_uint32 
00793    GSS_CALLCONV GSS_FUNC(gss_sign)
00794               (OM_uint32 *,        /* minor_status */
00795                gss_ctx_id_t,       /* context_handle */
00796                int,                /* qop_req */
00797                gss_buffer_t,       /* message_buffer */
00798                gss_buffer_t        /* message_token */
00799               );
00800 
00801 
00802    GSS_MAKE_TYPEDEF
00803    OM_uint32 
00804    GSS_CALLCONV GSS_FUNC(gss_verify)
00805               (OM_uint32 *,        /* minor_status */
00806                gss_ctx_id_t,       /* context_handle */
00807                gss_buffer_t,       /* message_buffer */
00808                gss_buffer_t,       /* token_buffer */
00809                int *               /* qop_state */
00810               );
00811 
00812    GSS_MAKE_TYPEDEF
00813    OM_uint32
00814    GSS_CALLCONV GSS_FUNC(gss_seal)
00815               (OM_uint32 *,        /* minor_status */
00816                gss_ctx_id_t,       /* context_handle */
00817                int,                /* conf_req_flag */
00818                int,                /* qop_req */
00819                gss_buffer_t,       /* input_message_buffer */
00820                int *,              /* conf_state */
00821                gss_buffer_t        /* output_message_buffer */
00822               );
00823 
00824 
00825    GSS_MAKE_TYPEDEF
00826    OM_uint32 
00827    GSS_CALLCONV GSS_FUNC(gss_unseal)
00828               (OM_uint32 *,        /* minor_status */
00829                gss_ctx_id_t,       /* context_handle */
00830                gss_buffer_t,       /* input_message_buffer */
00831                gss_buffer_t,       /* output_message_buffer */
00832                int *,              /* conf_state */
00833                int *               /* qop_state */
00834               );
00835 
00836 
00837 
00838 EXTERN_C_END
00839 
00840 #endif /* GSSAPI_H_ */
00841