1*0a6a1f1dSLionel Sambuc /* $NetBSD: gssapi_mech.h,v 1.1.1.2 2014/04/24 12:45:29 pettai Exp $ */ 2ebfedea0SLionel Sambuc 3ebfedea0SLionel Sambuc /*- 4ebfedea0SLionel Sambuc * Copyright (c) 2005 Doug Rabson 5ebfedea0SLionel Sambuc * All rights reserved. 6ebfedea0SLionel Sambuc * 7ebfedea0SLionel Sambuc * Redistribution and use in source and binary forms, with or without 8ebfedea0SLionel Sambuc * modification, are permitted provided that the following conditions 9ebfedea0SLionel Sambuc * are met: 10ebfedea0SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 11ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer. 12ebfedea0SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 13ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer in the 14ebfedea0SLionel Sambuc * documentation and/or other materials provided with the distribution. 15ebfedea0SLionel Sambuc * 16ebfedea0SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17ebfedea0SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18ebfedea0SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19ebfedea0SLionel Sambuc * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20ebfedea0SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21ebfedea0SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22ebfedea0SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23ebfedea0SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24ebfedea0SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25ebfedea0SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26ebfedea0SLionel Sambuc * SUCH DAMAGE. 27ebfedea0SLionel Sambuc * 28ebfedea0SLionel Sambuc * $FreeBSD: src/lib/libgssapi/mech_switch.h,v 1.1 2005/12/29 14:40:20 dfr Exp $ 29ebfedea0SLionel Sambuc */ 30ebfedea0SLionel Sambuc 31ebfedea0SLionel Sambuc #ifndef GSSAPI_MECH_H 32ebfedea0SLionel Sambuc #define GSSAPI_MECH_H 1 33ebfedea0SLionel Sambuc 34ebfedea0SLionel Sambuc #include <gssapi/gssapi.h> 35ebfedea0SLionel Sambuc 36ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_acquire_cred_t 37ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 38ebfedea0SLionel Sambuc const gss_name_t, /* desired_name */ 39ebfedea0SLionel Sambuc OM_uint32, /* time_req */ 40ebfedea0SLionel Sambuc const gss_OID_set, /* desired_mechs */ 41ebfedea0SLionel Sambuc gss_cred_usage_t, /* cred_usage */ 42ebfedea0SLionel Sambuc gss_cred_id_t *, /* output_cred_handle */ 43ebfedea0SLionel Sambuc gss_OID_set *, /* actual_mechs */ 44ebfedea0SLionel Sambuc OM_uint32 * /* time_rec */ 45ebfedea0SLionel Sambuc ); 46ebfedea0SLionel Sambuc 47ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_release_cred_t 48ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 49ebfedea0SLionel Sambuc gss_cred_id_t * /* cred_handle */ 50ebfedea0SLionel Sambuc ); 51ebfedea0SLionel Sambuc 52ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_init_sec_context_t 53ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 54ebfedea0SLionel Sambuc const gss_cred_id_t, /* initiator_cred_handle */ 55ebfedea0SLionel Sambuc gss_ctx_id_t *, /* context_handle */ 56ebfedea0SLionel Sambuc const gss_name_t, /* target_name */ 57ebfedea0SLionel Sambuc const gss_OID, /* mech_type */ 58ebfedea0SLionel Sambuc OM_uint32, /* req_flags */ 59ebfedea0SLionel Sambuc OM_uint32, /* time_req */ 60ebfedea0SLionel Sambuc const gss_channel_bindings_t, 61ebfedea0SLionel Sambuc /* input_chan_bindings */ 62ebfedea0SLionel Sambuc const gss_buffer_t, /* input_token */ 63ebfedea0SLionel Sambuc gss_OID *, /* actual_mech_type */ 64ebfedea0SLionel Sambuc gss_buffer_t, /* output_token */ 65ebfedea0SLionel Sambuc OM_uint32 *, /* ret_flags */ 66ebfedea0SLionel Sambuc OM_uint32 * /* time_rec */ 67ebfedea0SLionel Sambuc ); 68ebfedea0SLionel Sambuc 69ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_accept_sec_context_t 70ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 71ebfedea0SLionel Sambuc gss_ctx_id_t *, /* context_handle */ 72ebfedea0SLionel Sambuc const gss_cred_id_t, /* acceptor_cred_handle */ 73ebfedea0SLionel Sambuc const gss_buffer_t, /* input_token_buffer */ 74ebfedea0SLionel Sambuc const gss_channel_bindings_t, 75ebfedea0SLionel Sambuc /* input_chan_bindings */ 76ebfedea0SLionel Sambuc gss_name_t *, /* src_name */ 77ebfedea0SLionel Sambuc gss_OID *, /* mech_type */ 78ebfedea0SLionel Sambuc gss_buffer_t, /* output_token */ 79ebfedea0SLionel Sambuc OM_uint32 *, /* ret_flags */ 80ebfedea0SLionel Sambuc OM_uint32 *, /* time_rec */ 81ebfedea0SLionel Sambuc gss_cred_id_t * /* delegated_cred_handle */ 82ebfedea0SLionel Sambuc ); 83ebfedea0SLionel Sambuc 84ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_process_context_token_t 85ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 86ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 87ebfedea0SLionel Sambuc const gss_buffer_t /* token_buffer */ 88ebfedea0SLionel Sambuc ); 89ebfedea0SLionel Sambuc 90ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_delete_sec_context_t 91ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 92ebfedea0SLionel Sambuc gss_ctx_id_t *, /* context_handle */ 93ebfedea0SLionel Sambuc gss_buffer_t /* output_token */ 94ebfedea0SLionel Sambuc ); 95ebfedea0SLionel Sambuc 96ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_context_time_t 97ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 98ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 99ebfedea0SLionel Sambuc OM_uint32 * /* time_rec */ 100ebfedea0SLionel Sambuc ); 101ebfedea0SLionel Sambuc 102ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_get_mic_t 103ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 104ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 105ebfedea0SLionel Sambuc gss_qop_t, /* qop_req */ 106ebfedea0SLionel Sambuc const gss_buffer_t, /* message_buffer */ 107ebfedea0SLionel Sambuc gss_buffer_t /* message_token */ 108ebfedea0SLionel Sambuc ); 109ebfedea0SLionel Sambuc 110ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_verify_mic_t 111ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 112ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 113ebfedea0SLionel Sambuc const gss_buffer_t, /* message_buffer */ 114ebfedea0SLionel Sambuc const gss_buffer_t, /* token_buffer */ 115ebfedea0SLionel Sambuc gss_qop_t * /* qop_state */ 116ebfedea0SLionel Sambuc ); 117ebfedea0SLionel Sambuc 118ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_wrap_t 119ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 120ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 121ebfedea0SLionel Sambuc int, /* conf_req_flag */ 122ebfedea0SLionel Sambuc gss_qop_t, /* qop_req */ 123ebfedea0SLionel Sambuc const gss_buffer_t, /* input_message_buffer */ 124ebfedea0SLionel Sambuc int *, /* conf_state */ 125ebfedea0SLionel Sambuc gss_buffer_t /* output_message_buffer */ 126ebfedea0SLionel Sambuc ); 127ebfedea0SLionel Sambuc 128ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_unwrap_t 129ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 130ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 131ebfedea0SLionel Sambuc const gss_buffer_t, /* input_message_buffer */ 132ebfedea0SLionel Sambuc gss_buffer_t, /* output_message_buffer */ 133ebfedea0SLionel Sambuc int *, /* conf_state */ 134ebfedea0SLionel Sambuc gss_qop_t * /* qop_state */ 135ebfedea0SLionel Sambuc ); 136ebfedea0SLionel Sambuc 137ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_display_status_t 138ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 139ebfedea0SLionel Sambuc OM_uint32, /* status_value */ 140ebfedea0SLionel Sambuc int, /* status_type */ 141ebfedea0SLionel Sambuc const gss_OID, /* mech_type */ 142ebfedea0SLionel Sambuc OM_uint32 *, /* message_context */ 143ebfedea0SLionel Sambuc gss_buffer_t /* status_string */ 144ebfedea0SLionel Sambuc ); 145ebfedea0SLionel Sambuc 146ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_indicate_mechs_t 147ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 148ebfedea0SLionel Sambuc gss_OID_set * /* mech_set */ 149ebfedea0SLionel Sambuc ); 150ebfedea0SLionel Sambuc 151ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_compare_name_t 152ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 153ebfedea0SLionel Sambuc const gss_name_t, /* name1 */ 154ebfedea0SLionel Sambuc const gss_name_t, /* name2 */ 155ebfedea0SLionel Sambuc int * /* name_equal */ 156ebfedea0SLionel Sambuc ); 157ebfedea0SLionel Sambuc 158ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_display_name_t 159ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 160ebfedea0SLionel Sambuc const gss_name_t, /* input_name */ 161ebfedea0SLionel Sambuc gss_buffer_t, /* output_name_buffer */ 162ebfedea0SLionel Sambuc gss_OID * /* output_name_type */ 163ebfedea0SLionel Sambuc ); 164ebfedea0SLionel Sambuc 165ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_import_name_t 166ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 167ebfedea0SLionel Sambuc const gss_buffer_t, /* input_name_buffer */ 168ebfedea0SLionel Sambuc const gss_OID, /* input_name_type */ 169ebfedea0SLionel Sambuc gss_name_t * /* output_name */ 170ebfedea0SLionel Sambuc ); 171ebfedea0SLionel Sambuc 172ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_export_name_t 173ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 174ebfedea0SLionel Sambuc const gss_name_t, /* input_name */ 175ebfedea0SLionel Sambuc gss_buffer_t /* exported_name */ 176ebfedea0SLionel Sambuc ); 177ebfedea0SLionel Sambuc 178ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_release_name_t 179ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 180ebfedea0SLionel Sambuc gss_name_t * /* input_name */ 181ebfedea0SLionel Sambuc ); 182ebfedea0SLionel Sambuc 183ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_t 184ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 185ebfedea0SLionel Sambuc const gss_cred_id_t, /* cred_handle */ 186ebfedea0SLionel Sambuc gss_name_t *, /* name */ 187ebfedea0SLionel Sambuc OM_uint32 *, /* lifetime */ 188ebfedea0SLionel Sambuc gss_cred_usage_t *, /* cred_usage */ 189ebfedea0SLionel Sambuc gss_OID_set * /* mechanisms */ 190ebfedea0SLionel Sambuc ); 191ebfedea0SLionel Sambuc 192ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_context_t 193ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 194ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 195ebfedea0SLionel Sambuc gss_name_t *, /* src_name */ 196ebfedea0SLionel Sambuc gss_name_t *, /* targ_name */ 197ebfedea0SLionel Sambuc OM_uint32 *, /* lifetime_rec */ 198ebfedea0SLionel Sambuc gss_OID *, /* mech_type */ 199ebfedea0SLionel Sambuc OM_uint32 *, /* ctx_flags */ 200ebfedea0SLionel Sambuc int *, /* locally_initiated */ 201ebfedea0SLionel Sambuc int * /* open */ 202ebfedea0SLionel Sambuc ); 203ebfedea0SLionel Sambuc 204ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_wrap_size_limit_t 205ebfedea0SLionel Sambuc (OM_uint32 *, /* minor_status */ 206ebfedea0SLionel Sambuc const gss_ctx_id_t, /* context_handle */ 207ebfedea0SLionel Sambuc int, /* conf_req_flag */ 208ebfedea0SLionel Sambuc gss_qop_t, /* qop_req */ 209ebfedea0SLionel Sambuc OM_uint32, /* req_output_size */ 210ebfedea0SLionel Sambuc OM_uint32 * /* max_input_size */ 211ebfedea0SLionel Sambuc ); 212ebfedea0SLionel Sambuc 213ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_add_cred_t ( 214ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 215ebfedea0SLionel Sambuc const gss_cred_id_t, /* input_cred_handle */ 216ebfedea0SLionel Sambuc const gss_name_t, /* desired_name */ 217ebfedea0SLionel Sambuc const gss_OID, /* desired_mech */ 218ebfedea0SLionel Sambuc gss_cred_usage_t, /* cred_usage */ 219ebfedea0SLionel Sambuc OM_uint32, /* initiator_time_req */ 220ebfedea0SLionel Sambuc OM_uint32, /* acceptor_time_req */ 221ebfedea0SLionel Sambuc gss_cred_id_t *, /* output_cred_handle */ 222ebfedea0SLionel Sambuc gss_OID_set *, /* actual_mechs */ 223ebfedea0SLionel Sambuc OM_uint32 *, /* initiator_time_rec */ 224ebfedea0SLionel Sambuc OM_uint32 * /* acceptor_time_rec */ 225ebfedea0SLionel Sambuc ); 226ebfedea0SLionel Sambuc 227ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_by_mech_t ( 228ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 229ebfedea0SLionel Sambuc const gss_cred_id_t, /* cred_handle */ 230ebfedea0SLionel Sambuc const gss_OID, /* mech_type */ 231ebfedea0SLionel Sambuc gss_name_t *, /* name */ 232ebfedea0SLionel Sambuc OM_uint32 *, /* initiator_lifetime */ 233ebfedea0SLionel Sambuc OM_uint32 *, /* acceptor_lifetime */ 234ebfedea0SLionel Sambuc gss_cred_usage_t * /* cred_usage */ 235ebfedea0SLionel Sambuc ); 236ebfedea0SLionel Sambuc 237ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_export_sec_context_t ( 238ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 239ebfedea0SLionel Sambuc gss_ctx_id_t *, /* context_handle */ 240ebfedea0SLionel Sambuc gss_buffer_t /* interprocess_token */ 241ebfedea0SLionel Sambuc ); 242ebfedea0SLionel Sambuc 243ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_import_sec_context_t ( 244ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 245ebfedea0SLionel Sambuc const gss_buffer_t, /* interprocess_token */ 246ebfedea0SLionel Sambuc gss_ctx_id_t * /* context_handle */ 247ebfedea0SLionel Sambuc ); 248ebfedea0SLionel Sambuc 249ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_names_for_mech_t ( 250ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 251ebfedea0SLionel Sambuc const gss_OID, /* mechanism */ 252ebfedea0SLionel Sambuc gss_OID_set * /* name_types */ 253ebfedea0SLionel Sambuc ); 254ebfedea0SLionel Sambuc 255ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_mechs_for_name_t ( 256ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 257ebfedea0SLionel Sambuc const gss_name_t, /* input_name */ 258ebfedea0SLionel Sambuc gss_OID_set * /* mech_types */ 259ebfedea0SLionel Sambuc ); 260ebfedea0SLionel Sambuc 261ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_canonicalize_name_t ( 262ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 263ebfedea0SLionel Sambuc const gss_name_t, /* input_name */ 264ebfedea0SLionel Sambuc const gss_OID, /* mech_type */ 265ebfedea0SLionel Sambuc gss_name_t * /* output_name */ 266ebfedea0SLionel Sambuc ); 267ebfedea0SLionel Sambuc 268ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_duplicate_name_t ( 269ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 270ebfedea0SLionel Sambuc const gss_name_t, /* src_name */ 271ebfedea0SLionel Sambuc gss_name_t * /* dest_name */ 272ebfedea0SLionel Sambuc ); 273ebfedea0SLionel Sambuc 274ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_sec_context_by_oid ( 275ebfedea0SLionel Sambuc OM_uint32 *minor_status, 276ebfedea0SLionel Sambuc const gss_ctx_id_t context_handle, 277ebfedea0SLionel Sambuc const gss_OID desired_object, 278ebfedea0SLionel Sambuc gss_buffer_set_t *data_set 279ebfedea0SLionel Sambuc ); 280ebfedea0SLionel Sambuc 281ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_by_oid ( 282ebfedea0SLionel Sambuc OM_uint32 *minor_status, 283ebfedea0SLionel Sambuc const gss_cred_id_t cred, 284ebfedea0SLionel Sambuc const gss_OID desired_object, 285ebfedea0SLionel Sambuc gss_buffer_set_t *data_set 286ebfedea0SLionel Sambuc ); 287ebfedea0SLionel Sambuc 288ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_set_sec_context_option ( 289ebfedea0SLionel Sambuc OM_uint32 *minor_status, 290ebfedea0SLionel Sambuc gss_ctx_id_t *cred_handle, 291ebfedea0SLionel Sambuc const gss_OID desired_object, 292ebfedea0SLionel Sambuc const gss_buffer_t value 293ebfedea0SLionel Sambuc ); 294ebfedea0SLionel Sambuc 295ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_set_cred_option ( 296ebfedea0SLionel Sambuc OM_uint32 *minor_status, 297ebfedea0SLionel Sambuc gss_cred_id_t *cred_handle, 298ebfedea0SLionel Sambuc const gss_OID desired_object, 299ebfedea0SLionel Sambuc const gss_buffer_t value 300ebfedea0SLionel Sambuc ); 301ebfedea0SLionel Sambuc 302ebfedea0SLionel Sambuc 303ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_pseudo_random( 304ebfedea0SLionel Sambuc OM_uint32 *minor_status, 305ebfedea0SLionel Sambuc gss_ctx_id_t context, 306ebfedea0SLionel Sambuc int prf_key, 307ebfedea0SLionel Sambuc const gss_buffer_t prf_in, 308ebfedea0SLionel Sambuc ssize_t desired_output_len, 309ebfedea0SLionel Sambuc gss_buffer_t prf_out 310ebfedea0SLionel Sambuc ); 311ebfedea0SLionel Sambuc 312ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 313ebfedea0SLionel Sambuc _gss_wrap_iov_t(OM_uint32 *minor_status, 314ebfedea0SLionel Sambuc gss_ctx_id_t context_handle, 315ebfedea0SLionel Sambuc int conf_req_flag, 316ebfedea0SLionel Sambuc gss_qop_t qop_req, 317ebfedea0SLionel Sambuc int * conf_state, 318ebfedea0SLionel Sambuc gss_iov_buffer_desc *iov, 319ebfedea0SLionel Sambuc int iov_count); 320ebfedea0SLionel Sambuc 321ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 322ebfedea0SLionel Sambuc _gss_unwrap_iov_t(OM_uint32 *minor_status, 323ebfedea0SLionel Sambuc gss_ctx_id_t context_handle, 324ebfedea0SLionel Sambuc int *conf_state, 325ebfedea0SLionel Sambuc gss_qop_t *qop_state, 326ebfedea0SLionel Sambuc gss_iov_buffer_desc *iov, 327ebfedea0SLionel Sambuc int iov_count); 328ebfedea0SLionel Sambuc 329ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 330ebfedea0SLionel Sambuc _gss_wrap_iov_length_t(OM_uint32 * minor_status, 331ebfedea0SLionel Sambuc gss_ctx_id_t context_handle, 332ebfedea0SLionel Sambuc int conf_req_flag, 333ebfedea0SLionel Sambuc gss_qop_t qop_req, 334ebfedea0SLionel Sambuc int *conf_state, 335ebfedea0SLionel Sambuc gss_iov_buffer_desc *iov, 336ebfedea0SLionel Sambuc int iov_count); 337ebfedea0SLionel Sambuc 338ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 339ebfedea0SLionel Sambuc _gss_store_cred_t(OM_uint32 *minor_status, 340ebfedea0SLionel Sambuc gss_cred_id_t input_cred_handle, 341ebfedea0SLionel Sambuc gss_cred_usage_t cred_usage, 342ebfedea0SLionel Sambuc const gss_OID desired_mech, 343ebfedea0SLionel Sambuc OM_uint32 overwrite_cred, 344ebfedea0SLionel Sambuc OM_uint32 default_cred, 345ebfedea0SLionel Sambuc gss_OID_set *elements_stored, 346ebfedea0SLionel Sambuc gss_cred_usage_t *cred_usage_stored); 347ebfedea0SLionel Sambuc 348ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 349ebfedea0SLionel Sambuc _gss_export_cred_t(OM_uint32 *minor_status, 350ebfedea0SLionel Sambuc gss_cred_id_t cred_handle, 351ebfedea0SLionel Sambuc gss_buffer_t cred_token); 352ebfedea0SLionel Sambuc 353ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 354ebfedea0SLionel Sambuc _gss_import_cred_t(OM_uint32 * minor_status, 355ebfedea0SLionel Sambuc gss_buffer_t cred_token, 356ebfedea0SLionel Sambuc gss_cred_id_t * cred_handle); 357ebfedea0SLionel Sambuc 358ebfedea0SLionel Sambuc 359ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 360*0a6a1f1dSLionel Sambuc _gss_acquire_cred_ext_t(OM_uint32 * /*minor_status */, 361ebfedea0SLionel Sambuc const gss_name_t /* desired_name */, 362*0a6a1f1dSLionel Sambuc gss_const_OID /* credential_type */, 363*0a6a1f1dSLionel Sambuc const void * /* credential_data */, 364ebfedea0SLionel Sambuc OM_uint32 /* time_req */, 365*0a6a1f1dSLionel Sambuc gss_const_OID /* desired_mech */, 366ebfedea0SLionel Sambuc gss_cred_usage_t /* cred_usage */, 367*0a6a1f1dSLionel Sambuc gss_cred_id_t * /* output_cred_handle */); 368ebfedea0SLionel Sambuc 369ebfedea0SLionel Sambuc typedef void GSSAPI_CALLCONV 370ebfedea0SLionel Sambuc _gss_iter_creds_t(OM_uint32 /* flags */, 371ebfedea0SLionel Sambuc void * /* userctx */, 372ebfedea0SLionel Sambuc void (* /*cred_iter */ )(void *, gss_OID, gss_cred_id_t)); 373ebfedea0SLionel Sambuc 374ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 375ebfedea0SLionel Sambuc _gss_destroy_cred_t(OM_uint32 * /* minor_status */, 376ebfedea0SLionel Sambuc gss_cred_id_t * /* cred */); 377ebfedea0SLionel Sambuc 378ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 379ebfedea0SLionel Sambuc _gss_cred_hold_t(OM_uint32 * /* minor_status */, 380ebfedea0SLionel Sambuc gss_cred_id_t /* cred */); 381ebfedea0SLionel Sambuc 382ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 383ebfedea0SLionel Sambuc _gss_cred_unhold_t(OM_uint32 * /* minor_status */, 384ebfedea0SLionel Sambuc gss_cred_id_t /* cred */); 385ebfedea0SLionel Sambuc 386ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 387ebfedea0SLionel Sambuc _gss_cred_label_set_t(OM_uint32 * /* minor_status */, 388ebfedea0SLionel Sambuc gss_cred_id_t /* cred */, 389ebfedea0SLionel Sambuc const char * /* label */, 390ebfedea0SLionel Sambuc gss_buffer_t /* value */); 391ebfedea0SLionel Sambuc 392ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 393ebfedea0SLionel Sambuc _gss_cred_label_get_t(OM_uint32 * /* minor_status */, 394ebfedea0SLionel Sambuc gss_cred_id_t /* cred */, 395ebfedea0SLionel Sambuc const char * /* label */, 396ebfedea0SLionel Sambuc gss_buffer_t /* value */); 397ebfedea0SLionel Sambuc 398ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_display_name_ext_t ( 399ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 400ebfedea0SLionel Sambuc gss_name_t, /* name */ 401ebfedea0SLionel Sambuc gss_OID, /* display_as_name_type */ 402ebfedea0SLionel Sambuc gss_buffer_t /* display_name */ 403ebfedea0SLionel Sambuc ); 404ebfedea0SLionel Sambuc 405ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_name_t ( 406ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 407ebfedea0SLionel Sambuc gss_name_t, /* name */ 408ebfedea0SLionel Sambuc int *, /* name_is_MN */ 409ebfedea0SLionel Sambuc gss_OID *, /* MN_mech */ 410ebfedea0SLionel Sambuc gss_buffer_set_t * /* attrs */ 411ebfedea0SLionel Sambuc ); 412ebfedea0SLionel Sambuc 413ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_get_name_attribute_t ( 414ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 415ebfedea0SLionel Sambuc gss_name_t, /* name */ 416ebfedea0SLionel Sambuc gss_buffer_t, /* attr */ 417ebfedea0SLionel Sambuc int *, /* authenticated */ 418ebfedea0SLionel Sambuc int *, /* complete */ 419ebfedea0SLionel Sambuc gss_buffer_t, /* value */ 420ebfedea0SLionel Sambuc gss_buffer_t, /* display_value */ 421ebfedea0SLionel Sambuc int * /* more */ 422ebfedea0SLionel Sambuc ); 423ebfedea0SLionel Sambuc 424ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_set_name_attribute_t ( 425ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 426ebfedea0SLionel Sambuc gss_name_t, /* name */ 427ebfedea0SLionel Sambuc int, /* complete */ 428ebfedea0SLionel Sambuc gss_buffer_t, /* attr */ 429ebfedea0SLionel Sambuc gss_buffer_t /* value */ 430ebfedea0SLionel Sambuc ); 431ebfedea0SLionel Sambuc 432ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_delete_name_attribute_t ( 433ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 434ebfedea0SLionel Sambuc gss_name_t, /* name */ 435ebfedea0SLionel Sambuc gss_buffer_t /* attr */ 436ebfedea0SLionel Sambuc ); 437ebfedea0SLionel Sambuc 438ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_export_name_composite_t ( 439ebfedea0SLionel Sambuc OM_uint32 *, /* minor_status */ 440ebfedea0SLionel Sambuc gss_name_t, /* name */ 441ebfedea0SLionel Sambuc gss_buffer_t /* exp_composite_name */ 442ebfedea0SLionel Sambuc ); 443ebfedea0SLionel Sambuc 444ebfedea0SLionel Sambuc /* 445ebfedea0SLionel Sambuc * 446ebfedea0SLionel Sambuc */ 447ebfedea0SLionel Sambuc 448ebfedea0SLionel Sambuc typedef struct gss_mo_desc_struct gss_mo_desc; 449ebfedea0SLionel Sambuc 450ebfedea0SLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV 451ebfedea0SLionel Sambuc _gss_mo_init (OM_uint32 *, gss_OID, gss_mo_desc **, size_t *); 452ebfedea0SLionel Sambuc 453ebfedea0SLionel Sambuc 454ebfedea0SLionel Sambuc struct gss_mo_desc_struct { 455ebfedea0SLionel Sambuc gss_OID option; 456ebfedea0SLionel Sambuc OM_uint32 flags; 457ebfedea0SLionel Sambuc #define GSS_MO_MA 1 458ebfedea0SLionel Sambuc #define GSS_MO_MA_CRITICAL 2 459ebfedea0SLionel Sambuc const char *name; 460ebfedea0SLionel Sambuc void *ctx; 461ebfedea0SLionel Sambuc int (*get)(gss_const_OID, gss_mo_desc *, gss_buffer_t); 462ebfedea0SLionel Sambuc int (*set)(gss_const_OID, gss_mo_desc *, int, gss_buffer_t); 463ebfedea0SLionel Sambuc }; 464ebfedea0SLionel Sambuc 465*0a6a1f1dSLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_pname_to_uid_t ( 466*0a6a1f1dSLionel Sambuc OM_uint32 *, /* minor_status */ 467*0a6a1f1dSLionel Sambuc const gss_name_t, /* name */ 468*0a6a1f1dSLionel Sambuc const gss_OID, /* mech_type */ 469*0a6a1f1dSLionel Sambuc uid_t * /* uidOut */ 470*0a6a1f1dSLionel Sambuc ); 471*0a6a1f1dSLionel Sambuc 472*0a6a1f1dSLionel Sambuc typedef OM_uint32 GSSAPI_CALLCONV _gss_authorize_localname_t ( 473*0a6a1f1dSLionel Sambuc OM_uint32 *, /* minor_status */ 474*0a6a1f1dSLionel Sambuc const gss_name_t, /* name */ 475*0a6a1f1dSLionel Sambuc gss_const_buffer_t, /* user */ 476*0a6a1f1dSLionel Sambuc gss_const_OID /* user_name_type */ 477*0a6a1f1dSLionel Sambuc ); 478*0a6a1f1dSLionel Sambuc 479*0a6a1f1dSLionel Sambuc /* mechglue internal */ 480*0a6a1f1dSLionel Sambuc struct gss_mech_compat_desc_struct; 481ebfedea0SLionel Sambuc 482ebfedea0SLionel Sambuc #define GMI_VERSION 5 483ebfedea0SLionel Sambuc 484ebfedea0SLionel Sambuc /* gm_flags */ 485ebfedea0SLionel Sambuc #define GM_USE_MG_CRED 1 /* uses mech glue credentials */ 486ebfedea0SLionel Sambuc 487ebfedea0SLionel Sambuc typedef struct gssapi_mech_interface_desc { 488ebfedea0SLionel Sambuc unsigned gm_version; 489ebfedea0SLionel Sambuc const char *gm_name; 490ebfedea0SLionel Sambuc gss_OID_desc gm_mech_oid; 491ebfedea0SLionel Sambuc unsigned gm_flags; 492ebfedea0SLionel Sambuc _gss_acquire_cred_t *gm_acquire_cred; 493ebfedea0SLionel Sambuc _gss_release_cred_t *gm_release_cred; 494ebfedea0SLionel Sambuc _gss_init_sec_context_t *gm_init_sec_context; 495ebfedea0SLionel Sambuc _gss_accept_sec_context_t *gm_accept_sec_context; 496ebfedea0SLionel Sambuc _gss_process_context_token_t *gm_process_context_token; 497ebfedea0SLionel Sambuc _gss_delete_sec_context_t *gm_delete_sec_context; 498ebfedea0SLionel Sambuc _gss_context_time_t *gm_context_time; 499ebfedea0SLionel Sambuc _gss_get_mic_t *gm_get_mic; 500ebfedea0SLionel Sambuc _gss_verify_mic_t *gm_verify_mic; 501ebfedea0SLionel Sambuc _gss_wrap_t *gm_wrap; 502ebfedea0SLionel Sambuc _gss_unwrap_t *gm_unwrap; 503ebfedea0SLionel Sambuc _gss_display_status_t *gm_display_status; 504ebfedea0SLionel Sambuc _gss_indicate_mechs_t *gm_indicate_mechs; 505ebfedea0SLionel Sambuc _gss_compare_name_t *gm_compare_name; 506ebfedea0SLionel Sambuc _gss_display_name_t *gm_display_name; 507ebfedea0SLionel Sambuc _gss_import_name_t *gm_import_name; 508ebfedea0SLionel Sambuc _gss_export_name_t *gm_export_name; 509ebfedea0SLionel Sambuc _gss_release_name_t *gm_release_name; 510ebfedea0SLionel Sambuc _gss_inquire_cred_t *gm_inquire_cred; 511ebfedea0SLionel Sambuc _gss_inquire_context_t *gm_inquire_context; 512ebfedea0SLionel Sambuc _gss_wrap_size_limit_t *gm_wrap_size_limit; 513ebfedea0SLionel Sambuc _gss_add_cred_t *gm_add_cred; 514ebfedea0SLionel Sambuc _gss_inquire_cred_by_mech_t *gm_inquire_cred_by_mech; 515ebfedea0SLionel Sambuc _gss_export_sec_context_t *gm_export_sec_context; 516ebfedea0SLionel Sambuc _gss_import_sec_context_t *gm_import_sec_context; 517ebfedea0SLionel Sambuc _gss_inquire_names_for_mech_t *gm_inquire_names_for_mech; 518ebfedea0SLionel Sambuc _gss_inquire_mechs_for_name_t *gm_inquire_mechs_for_name; 519ebfedea0SLionel Sambuc _gss_canonicalize_name_t *gm_canonicalize_name; 520ebfedea0SLionel Sambuc _gss_duplicate_name_t *gm_duplicate_name; 521ebfedea0SLionel Sambuc _gss_inquire_sec_context_by_oid *gm_inquire_sec_context_by_oid; 522ebfedea0SLionel Sambuc _gss_inquire_cred_by_oid *gm_inquire_cred_by_oid; 523ebfedea0SLionel Sambuc _gss_set_sec_context_option *gm_set_sec_context_option; 524ebfedea0SLionel Sambuc _gss_set_cred_option *gm_set_cred_option; 525ebfedea0SLionel Sambuc _gss_pseudo_random *gm_pseudo_random; 526ebfedea0SLionel Sambuc _gss_wrap_iov_t *gm_wrap_iov; 527ebfedea0SLionel Sambuc _gss_unwrap_iov_t *gm_unwrap_iov; 528ebfedea0SLionel Sambuc _gss_wrap_iov_length_t *gm_wrap_iov_length; 529ebfedea0SLionel Sambuc _gss_store_cred_t *gm_store_cred; 530ebfedea0SLionel Sambuc _gss_export_cred_t *gm_export_cred; 531ebfedea0SLionel Sambuc _gss_import_cred_t *gm_import_cred; 532*0a6a1f1dSLionel Sambuc _gss_acquire_cred_ext_t *gm_acquire_cred_ext; 533ebfedea0SLionel Sambuc _gss_iter_creds_t *gm_iter_creds; 534ebfedea0SLionel Sambuc _gss_destroy_cred_t *gm_destroy_cred; 535ebfedea0SLionel Sambuc _gss_cred_hold_t *gm_cred_hold; 536ebfedea0SLionel Sambuc _gss_cred_unhold_t *gm_cred_unhold; 537ebfedea0SLionel Sambuc _gss_cred_label_get_t *gm_cred_label_get; 538ebfedea0SLionel Sambuc _gss_cred_label_set_t *gm_cred_label_set; 539ebfedea0SLionel Sambuc gss_mo_desc *gm_mo; 540ebfedea0SLionel Sambuc size_t gm_mo_num; 541*0a6a1f1dSLionel Sambuc _gss_pname_to_uid_t *gm_pname_to_uid; 542*0a6a1f1dSLionel Sambuc _gss_authorize_localname_t *gm_authorize_localname; 543ebfedea0SLionel Sambuc _gss_display_name_ext_t *gm_display_name_ext; 544ebfedea0SLionel Sambuc _gss_inquire_name_t *gm_inquire_name; 545ebfedea0SLionel Sambuc _gss_get_name_attribute_t *gm_get_name_attribute; 546ebfedea0SLionel Sambuc _gss_set_name_attribute_t *gm_set_name_attribute; 547ebfedea0SLionel Sambuc _gss_delete_name_attribute_t *gm_delete_name_attribute; 548ebfedea0SLionel Sambuc _gss_export_name_composite_t *gm_export_name_composite; 549*0a6a1f1dSLionel Sambuc struct gss_mech_compat_desc_struct *gm_compat; 550ebfedea0SLionel Sambuc } gssapi_mech_interface_desc, *gssapi_mech_interface; 551ebfedea0SLionel Sambuc 552ebfedea0SLionel Sambuc gssapi_mech_interface 553ebfedea0SLionel Sambuc __gss_get_mechanism(gss_const_OID /* oid */); 554ebfedea0SLionel Sambuc 555ebfedea0SLionel Sambuc gssapi_mech_interface __gss_spnego_initialize(void); 556ebfedea0SLionel Sambuc gssapi_mech_interface __gss_krb5_initialize(void); 557ebfedea0SLionel Sambuc gssapi_mech_interface __gss_ntlm_initialize(void); 558ebfedea0SLionel Sambuc 559ebfedea0SLionel Sambuc void gss_mg_collect_error(gss_OID, OM_uint32, OM_uint32); 560ebfedea0SLionel Sambuc 561ebfedea0SLionel Sambuc int _gss_mo_get_option_1(gss_const_OID, gss_mo_desc *, gss_buffer_t); 562ebfedea0SLionel Sambuc int _gss_mo_get_option_0(gss_const_OID, gss_mo_desc *, gss_buffer_t); 563ebfedea0SLionel Sambuc int _gss_mo_get_ctx_as_string(gss_const_OID, gss_mo_desc *, gss_buffer_t); 564ebfedea0SLionel Sambuc 565ebfedea0SLionel Sambuc struct _gss_oid_name_table { 566ebfedea0SLionel Sambuc gss_OID oid; 567ebfedea0SLionel Sambuc const char *name; 568ebfedea0SLionel Sambuc const char *short_desc; 569ebfedea0SLionel Sambuc const char *long_desc; 570ebfedea0SLionel Sambuc }; 571ebfedea0SLionel Sambuc 572ebfedea0SLionel Sambuc extern struct _gss_oid_name_table _gss_ont_mech[]; 573ebfedea0SLionel Sambuc extern struct _gss_oid_name_table _gss_ont_ma[]; 574ebfedea0SLionel Sambuc 575*0a6a1f1dSLionel Sambuc /* 576*0a6a1f1dSLionel Sambuc * Extended credentials acqusition API, not to be exported until 577*0a6a1f1dSLionel Sambuc * it or something equivalent has been standardised. 578*0a6a1f1dSLionel Sambuc */ 579*0a6a1f1dSLionel Sambuc extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_cred_password_oid_desc; 580*0a6a1f1dSLionel Sambuc #define GSS_C_CRED_PASSWORD (&__gss_c_cred_password_oid_desc) 581*0a6a1f1dSLionel Sambuc 582*0a6a1f1dSLionel Sambuc extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_cred_certificate_oid_desc; 583*0a6a1f1dSLionel Sambuc #define GSS_C_CRED_CERTIFICATE (&__gss_c_cred_certificate_oid_desc) 584*0a6a1f1dSLionel Sambuc 585*0a6a1f1dSLionel Sambuc OM_uint32 _gss_acquire_cred_ext 586*0a6a1f1dSLionel Sambuc (OM_uint32 * /*minor_status*/, 587*0a6a1f1dSLionel Sambuc const gss_name_t /*desired_name*/, 588*0a6a1f1dSLionel Sambuc gss_const_OID /*credential_type*/, 589*0a6a1f1dSLionel Sambuc const void * /*credential_data*/, 590*0a6a1f1dSLionel Sambuc OM_uint32 /*time_req*/, 591*0a6a1f1dSLionel Sambuc gss_const_OID /*desired_mech*/, 592*0a6a1f1dSLionel Sambuc gss_cred_usage_t /*cred_usage*/, 593*0a6a1f1dSLionel Sambuc gss_cred_id_t * /*output_cred_handle*/ 594*0a6a1f1dSLionel Sambuc ); 595*0a6a1f1dSLionel Sambuc 596ebfedea0SLionel Sambuc #endif /* GSSAPI_MECH_H */ 597