Path: blob/main/crypto/heimdal/lib/gssapi/mech/compat.h
34907 views
/*1* Copyright (c) 2010, PADL Software Pty Ltd.2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7*8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10*11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* 3. Neither the name of PADL Software nor the names of its contributors16* may be used to endorse or promote products derived from this software17* without specific prior written permission.18*19* THIS SOFTWARE IS PROVIDED BY PADL SOFTWARE AND CONTRIBUTORS ``AS IS'' AND20* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE21* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE22* ARE DISCLAIMED. IN NO EVENT SHALL PADL SOFTWARE OR CONTRIBUTORS BE LIABLE23* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL24* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS25* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)26* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT27* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY28* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF29* SUCH DAMAGE.30*/3132typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_saslname_for_mech_t (33OM_uint32 *, /* minor_status */34const gss_OID, /* desired_mech */35gss_buffer_t, /* sasl_mech_name */36gss_buffer_t, /* mech_name */37gss_buffer_t /* mech_description */38);3940typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_mech_for_saslname_t (41OM_uint32 *, /* minor_status */42const gss_buffer_t, /* sasl_mech_name */43gss_OID * /* mech_type */44);4546typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_attrs_for_mech_t (47OM_uint32 *, /* minor_status */48gss_const_OID, /* mech */49gss_OID_set *, /* mech_attrs */50gss_OID_set * /* known_mech_attrs */51);5253typedef OM_uint32 GSSAPI_CALLCONV _gss_acquire_cred_with_password_t54(OM_uint32 *, /* minor_status */55const gss_name_t, /* desired_name */56const gss_buffer_t, /* password */57OM_uint32, /* time_req */58const gss_OID_set, /* desired_mechs */59gss_cred_usage_t, /* cred_usage */60gss_cred_id_t *, /* output_cred_handle */61gss_OID_set *, /* actual_mechs */62OM_uint32 * /* time_rec */63);6465typedef OM_uint32 GSSAPI_CALLCONV _gss_add_cred_with_password_t (66OM_uint32 *, /* minor_status */67const gss_cred_id_t, /* input_cred_handle */68const gss_name_t, /* desired_name */69const gss_OID, /* desired_mech */70const gss_buffer_t, /* password */71gss_cred_usage_t, /* cred_usage */72OM_uint32, /* initiator_time_req */73OM_uint32, /* acceptor_time_req */74gss_cred_id_t *, /* output_cred_handle */75gss_OID_set *, /* actual_mechs */76OM_uint32 *, /* initiator_time_rec */77OM_uint32 * /* acceptor_time_rec */78);7980/*81* API-as-SPI compatibility for compatibility with MIT mechanisms;82* native Heimdal mechanisms should not use these.83*/84struct gss_mech_compat_desc_struct {85_gss_inquire_saslname_for_mech_t *gmc_inquire_saslname_for_mech;86_gss_inquire_mech_for_saslname_t *gmc_inquire_mech_for_saslname;87_gss_inquire_attrs_for_mech_t *gmc_inquire_attrs_for_mech;88_gss_acquire_cred_with_password_t *gmc_acquire_cred_with_password;89#if 090_gss_add_cred_with_password_t *gmc_add_cred_with_password;91#endif92};93949596