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