gssapi.h

00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef GSSAPI_H_
00018 #define GSSAPI_H_
00019 
00020 /*
00021  * Also define _GSSAPI_H_ as that is what the Kerberos 5 code defines and
00022  * what header files on some systems look for.
00023  */
00024 #define _GSSAPI_H_
00025 
00026 /* 
00027  * Define windows specific needed parameters.
00028  */
00029 
00030 #ifndef GSS_CALLCONV
00031 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
00032 #define GSS_CALLCONV __stdcall
00033 #define GSS_CALLCONV_C __cdecl
00034 #else
00035 #define GSS_CALLCONV
00036 #define GSS_CALLCONV_C
00037 #endif
00038 #endif /* GSS_CALLCONV */
00039 
00040 #ifdef GSS_USE_FUNCTION_POINTERS
00041 #define GSS_FUNC(f) (*f##_type)
00042 #define GSS_MAKE_TYPEDEF typedef
00043 #else
00044 #define GSS_FUNC(f) f
00045 #define GSS_MAKE_TYPEDEF
00046 #endif
00047 
00048 #include "globus_common.h"
00049 
00050 
00051 /*
00052  * Include stddef.h to get size_t defined.
00053  */
00054 #include <stddef.h>
00055 
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059 
00060 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
00061 
00065 #endif
00066 
00121 #define GLOBUS_GSI_GSSAPI_MODULE (&globus_i_gsi_gssapi_module)
00122 
00123 extern
00124 globus_module_descriptor_t              globus_i_gsi_gssapi_module;
00125 
00126 #define _GGSL(s) globus_common_i18n_get_string(GLOBUS_GSI_GSSAPI_MODULE,\
00127                                 s)
00128 
00129 /*
00130  * If the platform supports the xom.h header file, it should be
00131  * included here.
00132  */
00133 /* #include <xom.h> */
00134 
00135 
00136 /*
00137  * Now define the three implementation-dependent types.
00138  */
00139 
00140 
00141 typedef struct gss_name_desc_struct * gss_name_t;
00142 typedef struct gss_ctx_id_desc_struct * gss_ctx_id_t;
00143 typedef struct gss_cred_id_desc_struct * gss_cred_id_t;
00144 
00145 /*
00146  * The following type must be defined as the smallest natural
00147  * unsigned integer supported by the platform that has at least
00148  * 32 bits of precision.
00149  */
00150 
00151 #ifdef OM_STRING
00152 /*
00153  * We have included the xom.h header file.  Verify that OM_uint32
00154  * is defined correctly.
00155  */
00156 
00157 #if sizeof(globus_uint) != sizeof(OM_uint32)
00158 #error Incompatible definition of OM_uint32 from xom.h
00159 #endif
00160 
00161 typedef OM_object_identifier gss_OID_desc, *gss_OID;
00162 
00163 #else /* !OM_STRING */
00164 
00165 /*
00166  * We can't use X/Open definitions, so roll our own.
00167  */
00168 typedef globus_uint_t OM_uint32;
00169 typedef struct gss_OID_desc_struct
00170 {
00171     OM_uint32 length;
00172     void *elements;
00173 } gss_OID_desc, *gss_OID;
00174 
00175 #endif /* !OM_STRING */
00176 
00177 typedef struct gss_OID_set_desc_struct
00178 {
00179     size_t     count;
00180     gss_OID    elements;
00181 } gss_OID_set_desc, *gss_OID_set;
00182 
00183 
00184 /*
00185  * For now, define a QOP-type as an OM_uint32
00186  */
00187 typedef OM_uint32 gss_qop_t;
00188 
00189 typedef int gss_cred_usage_t;
00190 
00191 
00192 typedef struct gss_buffer_desc_struct
00193 {
00194     size_t length;
00195     void *value;
00196 } gss_buffer_desc, *gss_buffer_t;
00197 
00198 typedef struct gss_channel_bindings_struct
00199 {
00200     OM_uint32 initiator_addrtype;
00201     gss_buffer_desc initiator_address;
00202     OM_uint32 acceptor_addrtype;
00203     gss_buffer_desc acceptor_address;
00204     gss_buffer_desc application_data;
00205 } *gss_channel_bindings_t;
00206 
00207 /*
00208  * Flag bits for context-level services.
00209  */
00210 #define GSS_C_DELEG_FLAG 1
00211 #define GSS_C_MUTUAL_FLAG 2
00212 #define GSS_C_REPLAY_FLAG 4
00213 #define GSS_C_SEQUENCE_FLAG 8
00214 #define GSS_C_CONF_FLAG 16
00215 #define GSS_C_INTEG_FLAG 32
00216 #define GSS_C_ANON_FLAG 64
00217 #define GSS_C_PROT_READY_FLAG 128
00218 #define GSS_C_TRANS_FLAG 256
00219 
00220 /*
00221  * For the Globus gssapi_openssl we add three
00222  * flags. These may have to be changed in the
00223  * future, if they are defined in the RFCs.
00224  * GSS_C_GLOBUS_SSL_COMPATIBLE
00225  * input - The other is not using GSSAPI, but
00226  *               real SSL, so no delegation, etc.
00227  * GSS_C_GLOBUS_LIMITED_DELEG_PROXY_FLAG
00228  * input -  delegates a limited proxy
00229  * output - limited proxy received via delegation
00230  * GSS_C_GLOBUS_LIMITED_PROXY_FLAG
00231  * input - Dont accept limited proxy for auth
00232  * output- Limited proxy received.
00233  *
00234  * (Deprecated) GSS_C_GLOBUS_LIMITED_PROXY_MANY_FLAG
00235  * input - Accept proxies signed by limited proxies
00236  *
00237  * Since gss_accept_sec_context does not
00238  * provide a req_flag as input, we will
00239  * pass in  our GSS_C_GLOBUS_LIMITED_PROXY_FLAG
00240  * and GSS_C_GLOBUS_LIMITED_PROXY_MANY_FLAG
00241  * using the ret_flag
00242  */
00243 
00265 #define GSS_C_GLOBUS_DONT_ACCEPT_LIMITED_PROXY_FLAG 8192
00266 
00274 #define GSS_C_GLOBUS_DELEGATE_LIMITED_PROXY_FLAG    4096
00275 
00285 #define GSS_C_GLOBUS_ACCEPT_PROXY_SIGNED_BY_LIMITED_PROXY_FLAG 32768
00286 
00294 #define GSS_C_GLOBUS_ALLOW_MISSING_SIGNING_POLICY 65536
00295 
00303 #define GSS_C_GLOBUS_FORCE_SSL3 131072
00304 
00322 #define GSS_C_GLOBUS_RECEIVED_LIMITED_PROXY_FLAG    8192
00323 
00332 #define GSS_C_GLOBUS_RECEIVED_LIMITED_PROXY_DURING_DELEGATION_FLAG 4096
00333 
00334 #define GSS_C_GLOBUS_LIMITED_DELEG_PROXY_FLAG  4096
00335 #define GSS_C_GLOBUS_LIMITED_PROXY_FLAG        8192
00336 #define GSS_C_GLOBUS_SSL_COMPATIBLE           16384
00337 
00345 #define GSS_C_GLOBUS_LIMITED_PROXY_MANY_FLAG  32768
00346 
00347 /*
00348  * Credential usage options
00349  */
00350 #define GSS_C_BOTH 0
00351 #define GSS_C_INITIATE 1
00352 #define GSS_C_ACCEPT 2
00353 
00354 /*
00355  * Status code types for gss_display_status
00356  */
00357 #define GSS_C_GSS_CODE 1
00358 #define GSS_C_MECH_CODE 2
00359 
00360 /*
00361  * The constant definitions for channel-bindings address families
00362  */
00363 #define GSS_C_AF_UNSPEC     0
00364 #define GSS_C_AF_LOCAL      1
00365 #define GSS_C_AF_INET       2
00366 #define GSS_C_AF_IMPLINK    3
00367 #define GSS_C_AF_PUP        4
00368 #define GSS_C_AF_CHAOS      5
00369 #define GSS_C_AF_NS         6
00370 #define GSS_C_AF_NBS        7
00371 #define GSS_C_AF_ECMA       8
00372 #define GSS_C_AF_DATAKIT    9
00373 #define GSS_C_AF_CCITT      10
00374 #define GSS_C_AF_SNA        11
00375 #define GSS_C_AF_DECnet     12
00376 #define GSS_C_AF_DLI        13
00377 #define GSS_C_AF_LAT        14
00378 #define GSS_C_AF_HYLINK     15
00379 #define GSS_C_AF_APPLETALK  16
00380 #define GSS_C_AF_BSC        17
00381 #define GSS_C_AF_DSS        18
00382 #define GSS_C_AF_OSI        19
00383 #define GSS_C_AF_X25        21
00384 
00385 #define GSS_C_AF_NULLADDR   255
00386 
00387 /*
00388  * Various Null values
00389  */
00390 #define GSS_C_NO_NAME ((gss_name_t) 0)
00391 #define GSS_C_NO_BUFFER ((gss_buffer_t) 0)
00392 #define GSS_C_NO_BUFFER_SET ((gss_buffer_set_t) 0)
00393 #define GSS_C_NO_OID ((gss_OID) 0)
00394 #define GSS_C_NO_OID_SET ((gss_OID_set) 0)
00395 #define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)
00396 #define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)
00397 #define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)
00398 #define GSS_C_EMPTY_BUFFER {0, NULL}
00399 #define GSS_C_EMPTY_BUFFER_SET {0, (gss_buffer_t) 0}
00400 
00401 /*
00402  * Some alternate names for a couple of the above
00403  * values.  These are defined for V1 compatibility.
00404  */
00405 #define GSS_C_NULL_OID GSS_C_NO_OID
00406 #define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET
00407 
00408 /*
00409  * Define the default Quality of Protection for per-message
00410  * services.  Note that an implementation that offers multiple
00411  * levels of QOP may define GSS_C_QOP_DEFAULT to be either zero
00412  * (as done here) to mean "default protection", or to a specific
00413  * explicit QOP value.  However, a value of 0 should always be
00414  * interpreted by a GSSAPI implementation as a request for the
00415  * default protection level.
00416  */
00417 #define GSS_C_QOP_DEFAULT 0
00418 
00419 /*
00420  * Expiration time of 2^32-1 seconds means infinite lifetime for a
00421  * credential or security context
00422  */
00423 #define GSS_C_INDEFINITE 0xfffffffful
00424 
00425 /*
00426  * The implementation must reserve static storage for a
00427  * gss_OID_desc object containing the value
00428  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00429  *              "\x01\x02\x01\x01"},
00430  * corresponding to an object-identifier value of
00431  * {iso(1) member-body(2) United States(840) mit(113554)
00432  *  infosys(1) gssapi(2) generic(1) user_name(1)}.  The constant
00433  * GSS_C_NT_USER_NAME should be initialized to point
00434  * to that gss_OID_desc.
00435  */
00436 extern gss_OID GSS_C_NT_USER_NAME;
00437 
00438 /*
00439  * The implementation must reserve static storage for a
00440  * gss_OID_desc object containing the value
00441  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00442  *              "\x01\x02\x01\x02"},
00443  * corresponding to an object-identifier value of
00444  * {iso(1) member-body(2) United States(840) mit(113554)
00445  *  infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
00446  * The constant GSS_C_NT_MACHINE_UID_NAME should be
00447  * initialized to point to that gss_OID_desc.
00448  */
00449 extern gss_OID GSS_C_NT_MACHINE_UID_NAME;
00450 
00451 /*
00452  * The implementation must reserve static storage for a
00453  * gss_OID_desc object containing the value
00454  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00455  *              "\x01\x02\x01\x03"},
00456  * corresponding to an object-identifier value of
00457  * {iso(1) member-body(2) United States(840) mit(113554)
00458  *  infosys(1) gssapi(2) generic(1) string_uid_name(3)}.
00459  * The constant GSS_C_NT_STRING_UID_NAME should be
00460  * initialized to point to that gss_OID_desc.
00461  */
00462 extern gss_OID GSS_C_NT_STRING_UID_NAME;
00463 
00464 /*
00465  * The implementation must reserve static storage for a
00466  * gss_OID_desc object containing the value
00467  * {6, (void *)"\x2b\x06\x01\x05\x06\x02"},
00468  * corresponding to an object-identifier value of
00469  * {iso(1) org(3) dod(6) internet(1) security(5)
00470  * nametypes(6) gss-host-based-services(2)).  The constant
00471  * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point
00472  * to that gss_OID_desc.  This is a deprecated OID value, and
00473  * implementations wishing to support hostbased-service names
00474  * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,
00475  * defined below, to identify such names;
00476  * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym
00477  * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input
00478  * parameter, but should not be emitted by GSSAPI
00479  * implementations
00480  */
00481 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;
00482 
00483 /*
00484  * The implementation must reserve static storage for a
00485  * gss_OID_desc object containing the value
00486  * {10, (void *)"\x2a\x86\x48\x86\xf7\x12"
00487  *              "\x01\x02\x01\x04"}, corresponding to an
00488  * object-identifier value of {iso(1) member-body(2)
00489  * Unites States(840) mit(113554) infosys(1) gssapi(2)
00490  * generic(1) service_name(4)}.  The constant
00491  * GSS_C_NT_HOSTBASED_SERVICE should be initialized
00492  * to point to that gss_OID_desc.
00493  */
00494 extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;
00495 
00496 
00497 /*
00498  * The implementation must reserve static storage for a
00499  * gss_OID_desc object containing the value
00500  * {6, (void *)"\x2b\x06\01\x05\x06\x03"},
00501  * corresponding to an object identifier value of
00502  * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
00503  * 6(nametypes), 3(gss-anonymous-name)}.  The constant
00504  * and GSS_C_NT_ANONYMOUS should be initialized to point
00505  * to that gss_OID_desc.
00506  */
00507 extern gss_OID GSS_C_NT_ANONYMOUS;
00508 
00509 /*
00510  * The implementation must reserve static storage for a
00511  * gss_OID_desc object containing the value
00512  * {6, (void *)"\x2b\x06\x01\x05\x06\x04"},
00513  * corresponding to an object-identifier value of
00514  * {1(iso), 3(org), 6(dod), 1(internet), 5(security),
00515  * 6(nametypes), 4(gss-api-exported-name)}.  The constant
00516  * GSS_C_NT_EXPORT_NAME should be initialized to point
00517  * to that gss_OID_desc.
00518  */
00519 extern gss_OID GSS_C_NT_EXPORT_NAME;
00520 
00521 /* Major status codes */
00522 
00523 #define GSS_S_COMPLETE 0
00524 
00525 /*
00526  * Some "helper" definitions to make the status code macros obvious.
00527  */
00528 #define GSS_C_CALLING_ERROR_OFFSET 24
00529 #define GSS_C_ROUTINE_ERROR_OFFSET 16
00530 #define GSS_C_SUPPLEMENTARY_OFFSET 0
00531 #define GSS_C_CALLING_ERROR_MASK 0377ul
00532 #define GSS_C_ROUTINE_ERROR_MASK 0377ul
00533 #define GSS_C_SUPPLEMENTARY_MASK 0177777ul
00534 
00535 /*
00536  * The macros that test status codes for error conditions.
00537  * Note that the GSS_ERROR() macro has changed slightly from
00538  * the V1 GSSAPI so that it now evaluates its argument
00539  * only once.
00540  */
00541 #define GSS_CALLING_ERROR(x) \
00542 (x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
00543 #define GSS_ROUTINE_ERROR(x) \
00544      (x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
00545 #define GSS_SUPPLEMENTARY_INFO(x) \
00546      (x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
00547 #define GSS_ERROR(x) \
00548      (x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
00549            (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
00550 
00551 /*
00552  * Now the actual status code definitions
00553  */
00554 
00555 /*
00556  * Calling errors:
00557  */
00558 #define GSS_S_CALL_INACCESSIBLE_READ \
00559      (1ul << GSS_C_CALLING_ERROR_OFFSET)
00560 #define GSS_S_CALL_INACCESSIBLE_WRITE \
00561      (2ul << GSS_C_CALLING_ERROR_OFFSET)
00562 #define GSS_S_CALL_BAD_STRUCTURE \
00563      (3ul << GSS_C_CALLING_ERROR_OFFSET)
00564 
00565 /*
00566  * Routine errors:
00567  */
00568 #define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)
00569 #define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)
00570 #define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)
00571 #define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)
00572 #define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)
00573 #define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)
00574 #define GSS_S_BAD_MIC GSS_S_BAD_SIG
00575 #define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)
00576 #define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)
00577 #define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)
00578 #define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)
00579 #define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)
00580 #define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)
00581 #define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)
00582 #define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)
00583 #define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)
00584 #define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)
00585 #define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)
00586 #define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)
00587 #define GSS_S_EXT_COMPAT (19ul << GSS_C_ROUTINE_ERROR_OFFSET)
00588 
00589 
00590 /*
00591  * Supplementary info bits:
00592  */
00593 #define GSS_S_CONTINUE_NEEDED (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
00594 #define GSS_S_DUPLICATE_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
00595 #define GSS_S_OLD_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
00596 #define GSS_S_UNSEQ_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
00597 #define GSS_S_GAP_TOKEN (1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
00598 
00599 /*
00600  * Finally, function prototypes for the GSS-API routines.
00601  */
00602 
00603 GSS_MAKE_TYPEDEF
00604 OM_uint32
00605 GSS_CALLCONV GSS_FUNC(gss_acquire_cred)
00606     (OM_uint32 *,             /*  minor_status */
00607      const gss_name_t,        /* desired_name */
00608      OM_uint32,               /* time_req */
00609      const gss_OID_set,       /* desired_mechs */
00610      gss_cred_usage_t,        /* cred_usage */
00611      gss_cred_id_t *,         /* output_cred_handle */
00612      gss_OID_set *,           /* actual_mechs */
00613      OM_uint32 *);            /* time_rec */
00614 
00615 GSS_MAKE_TYPEDEF
00616 OM_uint32
00617 GSS_CALLCONV GSS_FUNC(gss_release_cred)
00618     (OM_uint32 *,             /* minor_status */
00619      gss_cred_id_t *);        /* cred_handle */
00620 
00621 GSS_MAKE_TYPEDEF
00622 OM_uint32
00623 GSS_CALLCONV GSS_FUNC(gss_init_sec_context)
00624     (OM_uint32 *,             /* minor_status */
00625      const gss_cred_id_t,     /* initiator_cred_handle */
00626      gss_ctx_id_t *,          /* context_handle */
00627      const gss_name_t,        /* target_name */
00628      const gss_OID,           /* mech_type */
00629      OM_uint32,               /* req_flags */
00630      OM_uint32,               /* time_req */
00631      const gss_channel_bindings_t, /* input_chan_bindings */
00632      const gss_buffer_t,      /* input_token */
00633      gss_OID *,               /* actual_mech_type */
00634      gss_buffer_t,            /* output_token */
00635      OM_uint32 *,             /* ret_flags */
00636      OM_uint32 *);            /* time_rec */
00637 
00638 GSS_MAKE_TYPEDEF
00639 OM_uint32
00640 GSS_CALLCONV GSS_FUNC(gss_accept_sec_context)
00641     (OM_uint32 *,             /* minor_status */
00642      gss_ctx_id_t *,          /* context_handle */
00643      const gss_cred_id_t,     /* acceptor_cred_handle */
00644      const gss_buffer_t,      /* input_token_buffer */
00645      const gss_channel_bindings_t, /* input_chan_bindings */
00646      gss_name_t *,            /* src_name */
00647      gss_OID *,               /* mech_type */
00648      gss_buffer_t,            /* output_token */
00649      OM_uint32 *,             /* ret_flags */
00650      OM_uint32 *,             /* time_rec */
00651      gss_cred_id_t *);        /* delegated_cred_handle */
00652 
00653 GSS_MAKE_TYPEDEF
00654 OM_uint32
00655 GSS_CALLCONV GSS_FUNC(gss_process_context_token)
00656     (OM_uint32 *,             /* minor_status */
00657      const gss_ctx_id_t,      /* context_handle */
00658      const gss_buffer_t);     /* token_buffer */
00659 
00660 GSS_MAKE_TYPEDEF
00661 OM_uint32
00662 GSS_CALLCONV GSS_FUNC(gss_delete_sec_context)
00663     (OM_uint32 *,             /* minor_status */
00664      gss_ctx_id_t *,          /* context_handle */
00665      gss_buffer_t);           /* output_token */
00666 
00667 GSS_MAKE_TYPEDEF
00668 OM_uint32
00669 GSS_CALLCONV GSS_FUNC(gss_context_time)
00670     (OM_uint32 *,             /* minor_status */
00671      const gss_ctx_id_t,      /* context_handle */
00672      OM_uint32 *);            /* time_rec */
00673 
00674 GSS_MAKE_TYPEDEF
00675 OM_uint32
00676 GSS_CALLCONV GSS_FUNC(gss_get_mic)
00677     (OM_uint32 *,             /* minor_status */
00678      const gss_ctx_id_t,      /* context_handle */
00679      gss_qop_t,               /* qop_req */
00680      const gss_buffer_t,      /* message_buffer */
00681      gss_buffer_t);           /* message_token */
00682 
00683 
00684 GSS_MAKE_TYPEDEF
00685 OM_uint32
00686 GSS_CALLCONV GSS_FUNC(gss_verify_mic)
00687     (OM_uint32 *,             /* minor_status */
00688      const gss_ctx_id_t,      /* context_handle */
00689      const gss_buffer_t,      /* message_buffer */
00690      const gss_buffer_t,      /* token_buffer */
00691      gss_qop_t *);            /* qop_state */
00692 
00693 GSS_MAKE_TYPEDEF
00694 OM_uint32
00695 GSS_CALLCONV GSS_FUNC(gss_wrap)
00696     (OM_uint32 *,             /* minor_status */
00697      const gss_ctx_id_t,      /* context_handle */
00698      int,                     /* conf_req_flag */
00699      gss_qop_t,               /* qop_req */
00700      const gss_buffer_t,      /* input_message_buffer */
00701      int *,                   /* conf_state */
00702      gss_buffer_t);           /* output_message_buffer */
00703 
00704 
00705 GSS_MAKE_TYPEDEF
00706 OM_uint32
00707 GSS_CALLCONV GSS_FUNC(gss_unwrap)
00708     (OM_uint32 *,             /* minor_status */
00709      const gss_ctx_id_t,      /* context_handle */
00710      const gss_buffer_t,      /* input_message_buffer */
00711      gss_buffer_t,            /* output_message_buffer */
00712      int *,                   /* conf_state */
00713      gss_qop_t *);            /* qop_state */
00714 
00715 GSS_MAKE_TYPEDEF
00716 OM_uint32
00717 GSS_CALLCONV GSS_FUNC(gss_display_status)
00718     (OM_uint32 *,             /* minor_status */
00719      OM_uint32,               /* status_value */
00720      int,                     /* status_type */
00721      const gss_OID,           /* mech_type */
00722      OM_uint32 *,             /* message_context */
00723      gss_buffer_t);           /* status_string */
00724 
00725 GSS_MAKE_TYPEDEF
00726 OM_uint32
00727 GSS_CALLCONV GSS_FUNC(gss_indicate_mechs)
00728     (OM_uint32 *,             /* minor_status */
00729      gss_OID_set *);          /* mech_set */
00730 
00731 GSS_MAKE_TYPEDEF
00732 OM_uint32
00733 GSS_CALLCONV GSS_FUNC(gss_compare_name)
00734     (OM_uint32 *,             /* minor_status */
00735      const gss_name_t,        /* name1 */
00736      const gss_name_t,        /* name2 */
00737      int *);                  /* name_equal */
00738 
00739 GSS_MAKE_TYPEDEF
00740 OM_uint32
00741 GSS_CALLCONV GSS_FUNC(gss_display_name)
00742     (OM_uint32 *,             /* minor_status */
00743      const gss_name_t,        /* input_name */
00744      gss_buffer_t,            /* output_name_buffer */
00745      gss_OID *);              /* output_name_type */
00746 
00747 GSS_MAKE_TYPEDEF
00748 OM_uint32
00749 GSS_CALLCONV GSS_FUNC(gss_import_name)
00750     (OM_uint32 *,             /* minor_status */
00751      const gss_buffer_t,      /* input_name_buffer */
00752      const gss_OID,           /* input_name_type */
00753      gss_name_t *);           /* output_name */
00754 
00755 GSS_MAKE_TYPEDEF
00756 OM_uint32
00757 GSS_CALLCONV GSS_FUNC(gss_export_name)
00758     (OM_uint32  *,            /* minor_status */
00759      const gss_name_t,        /* input_name */
00760      gss_buffer_t);           /* exported_name */
00761 
00762 GSS_MAKE_TYPEDEF
00763 OM_uint32
00764 GSS_CALLCONV GSS_FUNC(gss_release_name)
00765     (OM_uint32 *,             /* minor_status */
00766      gss_name_t *);           /* input_name */
00767 
00768 GSS_MAKE_TYPEDEF
00769 OM_uint32
00770 GSS_CALLCONV GSS_FUNC(gss_release_buffer)
00771     (OM_uint32 *,             /* minor_status */
00772      gss_buffer_t);           /* buffer */
00773 
00774 GSS_MAKE_TYPEDEF
00775 OM_uint32
00776 GSS_CALLCONV GSS_FUNC(gss_release_oid_set)
00777     (OM_uint32 *,             /* minor_status */
00778      gss_OID_set *);          /* set */
00779 
00780 GSS_MAKE_TYPEDEF
00781 OM_uint32
00782 GSS_CALLCONV GSS_FUNC(gss_inquire_cred)
00783     (OM_uint32 *,             /* minor_status */
00784      const gss_cred_id_t,     /* cred_handle */
00785      gss_name_t *,            /* name */
00786      OM_uint32 *,             /* lifetime */
00787      gss_cred_usage_t *,      /* cred_usage */
00788      gss_OID_set *);          /* mechanisms */
00789 
00790 GSS_MAKE_TYPEDEF
00791 OM_uint32
00792 GSS_CALLCONV GSS_FUNC(gss_inquire_context)
00793     (OM_uint32 *,             /* minor_status */
00794      const gss_ctx_id_t,      /* context_handle */
00795      gss_name_t *,            /* src_name */
00796      gss_name_t *,            /* targ_name */
00797      OM_uint32 *,             /* lifetime_rec */
00798      gss_OID *,               /* mech_type */
00799      OM_uint32 *,             /* ctx_flags */
00800      int *,                   /* locally_initiated */
00801      int *);                  /* open */
00802 
00803 GSS_MAKE_TYPEDEF
00804 OM_uint32
00805 GSS_CALLCONV GSS_FUNC(gss_wrap_size_limit)
00806     (OM_uint32 *,             /* minor_status */
00807      const gss_ctx_id_t,      /* context_handle */
00808      int,                     /* conf_req_flag */
00809      gss_qop_t,               /* qop_req */
00810      OM_uint32,               /* req_output_size */
00811      OM_uint32 *);            /* max_input_size */
00812 
00813 GSS_MAKE_TYPEDEF
00814 OM_uint32
00815 GSS_CALLCONV GSS_FUNC(gss_add_cred)
00816     (OM_uint32 *,             /* minor_status */
00817      const gss_cred_id_t,     /* input_cred_handle */
00818      const gss_name_t,        /* desired_name */
00819      const gss_OID,           /* desired_mech */
00820      gss_cred_usage_t,        /* cred_usage */
00821      OM_uint32,               /* initiator_time_req */
00822      OM_uint32,               /* acceptor_time_req */
00823      gss_cred_id_t *,         /* output_cred_handle */
00824      gss_OID_set *,           /* actual_mechs */
00825      OM_uint32 *,             /* initiator_time_rec */
00826      OM_uint32 *);            /* acceptor_time_rec */
00827 
00828 GSS_MAKE_TYPEDEF
00829 OM_uint32
00830 GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_mech)
00831     (OM_uint32 *,             /* minor_status */
00832      const gss_cred_id_t,     /* cred_handle */
00833      const gss_OID,           /* mech_type */
00834      gss_name_t *,            /* name */
00835      OM_uint32 *,             /* initiator_lifetime */
00836      OM_uint32 *,             /* acceptor_lifetime */
00837      gss_cred_usage_t *);     /* cred_usage */
00838 
00839 GSS_MAKE_TYPEDEF
00840 OM_uint32
00841 GSS_CALLCONV GSS_FUNC(gss_export_sec_context)
00842     (OM_uint32 *,             /* minor_status */
00843      gss_ctx_id_t *,          /* context_handle */
00844      gss_buffer_t);           /* interprocess_token */
00845 
00846 GSS_MAKE_TYPEDEF
00847 OM_uint32
00848 GSS_CALLCONV GSS_FUNC(gss_import_sec_context)
00849     (OM_uint32 *,             /* minor_status */
00850      const gss_buffer_t,      /* interprocess_token */
00851      gss_ctx_id_t *);         /* context_handle */
00852 
00853 GSS_MAKE_TYPEDEF
00854 OM_uint32
00855 GSS_CALLCONV GSS_FUNC(gss_create_empty_oid_set)
00856     (OM_uint32 *,             /* minor_status */
00857      gss_OID_set *);          /* oid_set */
00858 
00859 GSS_MAKE_TYPEDEF
00860 OM_uint32
00861 GSS_CALLCONV GSS_FUNC(gss_add_oid_set_member)
00862     (OM_uint32 *,             /* minor_status */
00863      const gss_OID,           /* member_oid */
00864      gss_OID_set *);          /* oid_set */
00865 
00866 GSS_MAKE_TYPEDEF
00867 OM_uint32
00868 GSS_CALLCONV GSS_FUNC(gss_test_oid_set_member)
00869     (OM_uint32 *,             /* minor_status */
00870      const gss_OID,           /* member */
00871      const gss_OID_set,       /* set */
00872      int *);                  /* present */
00873 
00874 GSS_MAKE_TYPEDEF
00875 OM_uint32
00876 GSS_CALLCONV GSS_FUNC(gss_inquire_names_for_mech)
00877     (OM_uint32 *,             /* minor_status */
00878      const gss_OID,           /* mechanism */
00879      gss_OID_set *            /* name_types */
00880         );
00881 
00882 GSS_MAKE_TYPEDEF
00883 OM_uint32
00884 GSS_CALLCONV GSS_FUNC(gss_inquire_mechs_for_name)
00885     (OM_uint32 *,             /* minor_status */
00886      const gss_name_t,        /* input_name */
00887      gss_OID_set *);          /* mech_types */
00888 
00889 GSS_MAKE_TYPEDEF
00890 OM_uint32
00891 GSS_CALLCONV GSS_FUNC(gss_canonicalize_name)
00892     (OM_uint32 *,             /* minor_status */
00893      const gss_name_t,        /* input_name */
00894      const gss_OID,           /* mech_type */
00895      gss_name_t *);           /* output_name */
00896 
00897 GSS_MAKE_TYPEDEF
00898 OM_uint32
00899 GSS_CALLCONV GSS_FUNC(gss_duplicate_name)
00900     (OM_uint32 *,             /* minor_status */
00901      const gss_name_t,        /* src_name */
00902      gss_name_t *);           /* dest_name */
00903 
00904 /*
00905  * The following routines are obsolete variants of gss_get_mic,
00906  * gss_verify_mic, gss_wrap and gss_unwrap.  They should be
00907  * provided by GSSAPI V2 implementations for backwards
00908  * compatibility with V1 applications.  Distinct entrypoints
00909  * (as opposed to #defines) should be provided, both to allow
00910  * GSSAPI V1 applications to link against GSSAPI V2 implementations,
00911  * and to retain the slight parameter type differences between the
00912  * obsolete versions of these routines and their current forms.
00913  */
00914 
00915 GSS_MAKE_TYPEDEF
00916 OM_uint32
00917 GSS_CALLCONV GSS_FUNC(gss_sign)
00918     (OM_uint32 *,        /* minor_status */
00919      gss_ctx_id_t,       /* context_handle */
00920      int,                /* qop_req */
00921      gss_buffer_t,       /* message_buffer */
00922      gss_buffer_t);      /* message_token */
00923 
00924 GSS_MAKE_TYPEDEF
00925 OM_uint32
00926 GSS_CALLCONV GSS_FUNC(gss_verify)
00927     (OM_uint32 *,        /* minor_status */
00928      gss_ctx_id_t,       /* context_handle */
00929      gss_buffer_t,       /* message_buffer */
00930      gss_buffer_t,       /* token_buffer */
00931      int *);             /* qop_state */
00932 
00933 GSS_MAKE_TYPEDEF
00934 OM_uint32
00935 GSS_CALLCONV GSS_FUNC(gss_seal)
00936     (OM_uint32 *,        /* minor_status */
00937      gss_ctx_id_t,       /* context_handle */
00938      int,                /* conf_req_flag */
00939      int,                /* qop_req */
00940      gss_buffer_t,       /* input_message_buffer */
00941      int *,              /* conf_state */
00942      gss_buffer_t);      /* output_message_buffer */
00943 
00944 GSS_MAKE_TYPEDEF
00945 OM_uint32
00946 GSS_CALLCONV GSS_FUNC(gss_unseal)
00947     (OM_uint32 *,        /* minor_status */
00948      gss_ctx_id_t,       /* context_handle */
00949      gss_buffer_t,       /* input_message_buffer */
00950      gss_buffer_t,       /* output_message_buffer */
00951      int *,              /* conf_state */
00952      int *);             /* qop_state */
00953 
00954 #ifndef USE_ONLY_STANDARD_GSSAPI
00955 #define _HAVE_GSI_EXTENDED_GSSAPI
00956 
00977 typedef struct gss_buffer_set_desc_struct
00978 {
00979     size_t                              count;
00980     gss_buffer_t                        elements;
00981 } gss_buffer_set_desc, *gss_buffer_set_t;
00982 
00983 GSS_MAKE_TYPEDEF
00984 OM_uint32
00985 GSS_CALLCONV GSS_FUNC(gss_create_empty_buffer_set)
00986     (OM_uint32 *,          /* minor_status */
00987      gss_buffer_set_t *);  /* buffer set to be created */
00988 
00989 GSS_MAKE_TYPEDEF
00990 OM_uint32
00991 GSS_CALLCONV GSS_FUNC(gss_add_buffer_set_member)
00992     (OM_uint32 *,          /* minor_status */
00993      const gss_buffer_t,   /* member_buffer */
00994      gss_buffer_set_t *);  /* buffer set to be freed */
00995 
00996 GSS_MAKE_TYPEDEF
00997 OM_uint32
00998 GSS_CALLCONV GSS_FUNC(gss_release_buffer_set)
00999     (OM_uint32 *,          /* minor_status */
01000      gss_buffer_set_t *);  /* buffer set to be freed */
01001 
01002 GSS_MAKE_TYPEDEF
01003 OM_uint32
01004 GSS_CALLCONV GSS_FUNC(gss_import_cred)
01005     (OM_uint32 *,        /* minor_status */
01006      gss_cred_id_t *,    /* cred to be exported */
01007      const gss_OID,      /* desired mech*/
01008      OM_uint32,          /* option req */
01009      const gss_buffer_t, /* import buffer */
01010      OM_uint32,          /* time req */
01011      OM_uint32 *);       /* time rec */
01012 
01013 GSS_MAKE_TYPEDEF
01014 OM_uint32
01015 GSS_CALLCONV GSS_FUNC(gss_export_cred)
01016     (OM_uint32 *,        /* minor_status */
01017      const gss_cred_id_t,/* cred_handle */
01018      const gss_OID,      /* desired mech */
01019      OM_uint32,          /* option req */
01020      gss_buffer_t);      /* output buffer */
01021 
01022 GSS_MAKE_TYPEDEF
01023 OM_uint32
01024 GSS_CALLCONV GSS_FUNC(gss_init_delegation)
01025     (OM_uint32 *,              /* minor_status */
01026      const gss_ctx_id_t,       /* context_handle */
01027      const gss_cred_id_t,      /* cred_handle */
01028      const gss_OID,            /* desired_mech */
01029      const gss_OID_set,        /* extension_oids */
01030      const gss_buffer_set_t,   /* extension_buffers */
01031      const gss_buffer_t,       /* input_token */
01032      OM_uint32,                /* req_flags */
01033      OM_uint32,                /* time_req */
01034      gss_buffer_t);            /* output_token */
01035 
01036 GSS_MAKE_TYPEDEF
01037 OM_uint32
01038 GSS_CALLCONV GSS_FUNC(gss_accept_delegation)
01039     (OM_uint32 *,            /* minor_status */
01040      const gss_ctx_id_t,     /* context_handle */
01041      const gss_OID_set,      /* extension_oids */
01042      const gss_buffer_set_t, /* extension_buffers */
01043      const gss_buffer_t,     /* input_token */
01044      OM_uint32,              /* req_flags */
01045      OM_uint32,              /* time_req */
01046      OM_uint32 *,            /* time_rec */
01047      gss_cred_id_t *,        /* delegated_cred_handle */
01048      gss_OID *,              /* mech_type */
01049      gss_buffer_t);          /* output_token */
01050 
01051 GSS_MAKE_TYPEDEF
01052 OM_uint32
01053 GSS_CALLCONV GSS_FUNC(gss_inquire_sec_context_by_oid)
01054     (OM_uint32 *,            /* minor_status */
01055      const gss_ctx_id_t,     /* context_handle */
01056      const gss_OID,          /* desired_object */
01057      gss_buffer_set_t *);    /* data_set */
01058 
01059 GSS_MAKE_TYPEDEF
01060 OM_uint32
01061 GSS_CALLCONV GSS_FUNC(gss_inquire_cred_by_oid)
01062     (OM_uint32 *,            /* minor_status */
01063      const gss_cred_id_t,    /* context_handle */
01064      const gss_OID,          /* desired_object */
01065      gss_buffer_set_t *);    /* data_set */
01066 
01067 GSS_MAKE_TYPEDEF
01068 OM_uint32
01069 GSS_CALLCONV GSS_FUNC(gss_set_sec_context_option)
01070     (OM_uint32 *,                       /* minor_status */
01071      gss_ctx_id_t *,                    /* context_handle */
01072      const gss_OID,                     /* option */
01073      const gss_buffer_t);               /* value */
01074 
01075 extern const gss_OID_desc * const GSS_DISALLOW_ENCRYPTION;
01076 extern const gss_OID_desc * const GSS_PROTECTION_FAIL_ON_CONTEXT_EXPIRATION;
01077 extern const gss_OID_desc * const GSS_APPLICATION_WILL_HANDLE_EXTENSIONS;
01078 
01079 #endif /* GSI_EXTENDED_GSSAPI */
01080 
01081 #ifdef __cplusplus
01082 }
01083 #endif
01084 
01085 #endif /* GSSAPI_H_ */

Generated on 14 Nov 2014 for globus_gssapi_gsi by  doxygen 1.4.7