Path: blob/main/crypto/heimdal/lib/gssapi/ntlm/external.c
34914 views
/*1* Copyright (c) 2006 Kungliga Tekniska Högskolan2* (Royal Institute of Technology, Stockholm, Sweden).3* All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8*9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11*12* 2. Redistributions in binary form must reproduce the above copyright13* notice, this list of conditions and the following disclaimer in the14* documentation and/or other materials provided with the distribution.15*16* 3. Neither the name of the Institute nor the names of its contributors17* may be used to endorse or promote products derived from this software18* without specific prior written permission.19*20* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND21* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE24* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL25* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS26* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)27* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT28* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY29* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF30* SUCH DAMAGE.31*/3233#include "ntlm.h"3435#if 036static gss_mo_desc ntlm_mo[] = {37{38GSS_C_MA_SASL_MECH_NAME,39GSS_MO_MA,40"SASL mech name",41rk_UNCONST("NTLM"),42_gss_mo_get_ctx_as_string,43NULL44},45{46GSS_C_MA_MECH_NAME,47GSS_MO_MA,48"Mechanism name",49rk_UNCONST("NTLMSPP"),50_gss_mo_get_ctx_as_string,51NULL52},53{54GSS_C_MA_MECH_DESCRIPTION,55GSS_MO_MA,56"Mechanism description",57rk_UNCONST("Heimdal NTLMSSP Mechanism"),58_gss_mo_get_ctx_as_string,59NULL60}61};6263#endif6465static gssapi_mech_interface_desc ntlm_mech = {66GMI_VERSION,67"ntlm",68{10, rk_UNCONST("\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a") },690,70_gss_ntlm_acquire_cred,71_gss_ntlm_release_cred,72_gss_ntlm_init_sec_context,73_gss_ntlm_accept_sec_context,74_gss_ntlm_process_context_token,75_gss_ntlm_delete_sec_context,76_gss_ntlm_context_time,77_gss_ntlm_get_mic,78_gss_ntlm_verify_mic,79_gss_ntlm_wrap,80_gss_ntlm_unwrap,81_gss_ntlm_display_status,82NULL,83_gss_ntlm_compare_name,84_gss_ntlm_display_name,85_gss_ntlm_import_name,86_gss_ntlm_export_name,87_gss_ntlm_release_name,88_gss_ntlm_inquire_cred,89_gss_ntlm_inquire_context,90_gss_ntlm_wrap_size_limit,91_gss_ntlm_add_cred,92_gss_ntlm_inquire_cred_by_mech,93_gss_ntlm_export_sec_context,94_gss_ntlm_import_sec_context,95_gss_ntlm_inquire_names_for_mech,96_gss_ntlm_inquire_mechs_for_name,97_gss_ntlm_canonicalize_name,98_gss_ntlm_duplicate_name,99_gss_ntlm_inquire_sec_context_by_oid,100NULL,101NULL,102NULL,103NULL,104NULL,105NULL,106NULL,107NULL,108NULL,109NULL,110NULL,111_gss_ntlm_iter_creds_f,112_gss_ntlm_destroy_cred,113NULL,114NULL,115NULL,116NULL,117#if 0118ntlm_mo,119sizeof(ntlm_mo) / sizeof(ntlm_mo[0]),120#else121NULL,1220,123#endif124NULL,125NULL,126NULL,127NULL,128NULL,129NULL,130};131132gssapi_mech_interface133__gss_ntlm_initialize(void)134{135return &ntlm_mech;136}137138139