1 1.1 elric /* $NetBSD: external.c,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) 2006 Kungliga Tekniska Hgskolan 5 1.1 elric * (Royal Institute of Technology, Stockholm, Sweden). 6 1.1 elric * All rights reserved. 7 1.1 elric * 8 1.1 elric * Redistribution and use in source and binary forms, with or without 9 1.1 elric * modification, are permitted provided that the following conditions 10 1.1 elric * are met: 11 1.1 elric * 12 1.1 elric * 1. Redistributions of source code must retain the above copyright 13 1.1 elric * notice, this list of conditions and the following disclaimer. 14 1.1 elric * 15 1.1 elric * 2. Redistributions in binary form must reproduce the above copyright 16 1.1 elric * notice, this list of conditions and the following disclaimer in the 17 1.1 elric * documentation and/or other materials provided with the distribution. 18 1.1 elric * 19 1.1 elric * 3. Neither the name of the Institute nor the names of its contributors 20 1.1 elric * may be used to endorse or promote products derived from this software 21 1.1 elric * without specific prior written permission. 22 1.1 elric * 23 1.1 elric * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 24 1.1 elric * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 1.1 elric * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 1.1 elric * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 27 1.1 elric * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 1.1 elric * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 1.1 elric * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 1.1 elric * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 1.1 elric * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 1.1 elric * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 1.1 elric * SUCH DAMAGE. 34 1.1 elric */ 35 1.1 elric 36 1.1 elric #include "ntlm.h" 37 1.1 elric 38 1.1 elric static gss_mo_desc ntlm_mo[] = { 39 1.1 elric { 40 1.1 elric GSS_C_MA_SASL_MECH_NAME, 41 1.1 elric GSS_MO_MA, 42 1.1 elric "SASL mech name", 43 1.2 christos rk_UNCONST("NTLM"), 44 1.1 elric _gss_mo_get_ctx_as_string, 45 1.1 elric NULL 46 1.1 elric }, 47 1.1 elric { 48 1.1 elric GSS_C_MA_MECH_NAME, 49 1.1 elric GSS_MO_MA, 50 1.1 elric "Mechanism name", 51 1.2 christos rk_UNCONST("NTLMSPP"), 52 1.1 elric _gss_mo_get_ctx_as_string, 53 1.1 elric NULL 54 1.1 elric }, 55 1.1 elric { 56 1.1 elric GSS_C_MA_MECH_DESCRIPTION, 57 1.1 elric GSS_MO_MA, 58 1.1 elric "Mechanism description", 59 1.2 christos rk_UNCONST("Heimdal NTLMSSP Mechanism"), 60 1.1 elric _gss_mo_get_ctx_as_string, 61 1.1 elric NULL 62 1.1 elric } 63 1.1 elric }; 64 1.1 elric 65 1.1 elric static gssapi_mech_interface_desc ntlm_mech = { 66 1.1 elric GMI_VERSION, 67 1.1 elric "ntlm", 68 1.1 elric {10, rk_UNCONST("\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a") }, 69 1.1 elric 0, 70 1.1 elric _gss_ntlm_acquire_cred, 71 1.1 elric _gss_ntlm_release_cred, 72 1.1 elric _gss_ntlm_init_sec_context, 73 1.1 elric _gss_ntlm_accept_sec_context, 74 1.1 elric _gss_ntlm_process_context_token, 75 1.1 elric _gss_ntlm_delete_sec_context, 76 1.1 elric _gss_ntlm_context_time, 77 1.1 elric _gss_ntlm_get_mic, 78 1.1 elric _gss_ntlm_verify_mic, 79 1.1 elric _gss_ntlm_wrap, 80 1.1 elric _gss_ntlm_unwrap, 81 1.1 elric _gss_ntlm_display_status, 82 1.1 elric NULL, 83 1.1 elric _gss_ntlm_compare_name, 84 1.1 elric _gss_ntlm_display_name, 85 1.1 elric _gss_ntlm_import_name, 86 1.1 elric _gss_ntlm_export_name, 87 1.1 elric _gss_ntlm_release_name, 88 1.1 elric _gss_ntlm_inquire_cred, 89 1.1 elric _gss_ntlm_inquire_context, 90 1.1 elric _gss_ntlm_wrap_size_limit, 91 1.1 elric _gss_ntlm_add_cred, 92 1.1 elric _gss_ntlm_inquire_cred_by_mech, 93 1.1 elric _gss_ntlm_export_sec_context, 94 1.1 elric _gss_ntlm_import_sec_context, 95 1.1 elric _gss_ntlm_inquire_names_for_mech, 96 1.1 elric _gss_ntlm_inquire_mechs_for_name, 97 1.1 elric _gss_ntlm_canonicalize_name, 98 1.1 elric _gss_ntlm_duplicate_name, 99 1.1 elric _gss_ntlm_inquire_sec_context_by_oid, 100 1.1 elric NULL, 101 1.1 elric NULL, 102 1.1 elric NULL, 103 1.1 elric NULL, 104 1.1 elric NULL, 105 1.1 elric NULL, 106 1.1 elric NULL, 107 1.1 elric NULL, 108 1.1 elric NULL, 109 1.1 elric NULL, 110 1.1 elric NULL, 111 1.1 elric _gss_ntlm_iter_creds_f, 112 1.1 elric _gss_ntlm_destroy_cred, 113 1.1 elric NULL, 114 1.1 elric NULL, 115 1.1 elric NULL, 116 1.1 elric NULL, 117 1.1 elric ntlm_mo, 118 1.2 christos sizeof(ntlm_mo) / sizeof(ntlm_mo[0]), 119 1.2 christos NULL, 120 1.2 christos NULL, 121 1.2 christos NULL, 122 1.2 christos NULL, 123 1.2 christos NULL, 124 1.2 christos NULL, 125 1.2 christos NULL, 126 1.2 christos NULL, 127 1.2 christos NULL, 128 1.1 elric }; 129 1.1 elric 130 1.1 elric gssapi_mech_interface 131 1.1 elric __gss_ntlm_initialize(void) 132 1.1 elric { 133 1.1 elric return &ntlm_mech; 134 1.1 elric } 135