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