1c19800e8SDoug Rabson /* 2c19800e8SDoug Rabson * Copyright (c) 2004, PADL Software Pty Ltd. 3c19800e8SDoug Rabson * All rights reserved. 4c19800e8SDoug Rabson * 5c19800e8SDoug Rabson * Redistribution and use in source and binary forms, with or without 6c19800e8SDoug Rabson * modification, are permitted provided that the following conditions 7c19800e8SDoug Rabson * are met: 8c19800e8SDoug Rabson * 9c19800e8SDoug Rabson * 1. Redistributions of source code must retain the above copyright 10c19800e8SDoug Rabson * notice, this list of conditions and the following disclaimer. 11c19800e8SDoug Rabson * 12c19800e8SDoug Rabson * 2. Redistributions in binary form must reproduce the above copyright 13c19800e8SDoug Rabson * notice, this list of conditions and the following disclaimer in the 14c19800e8SDoug Rabson * documentation and/or other materials provided with the distribution. 15c19800e8SDoug Rabson * 16c19800e8SDoug Rabson * 3. Neither the name of PADL Software nor the names of its contributors 17c19800e8SDoug Rabson * may be used to endorse or promote products derived from this software 18c19800e8SDoug Rabson * without specific prior written permission. 19c19800e8SDoug Rabson * 20c19800e8SDoug Rabson * THIS SOFTWARE IS PROVIDED BY PADL SOFTWARE AND CONTRIBUTORS ``AS IS'' AND 21c19800e8SDoug Rabson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22c19800e8SDoug Rabson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23c19800e8SDoug Rabson * ARE DISCLAIMED. IN NO EVENT SHALL PADL SOFTWARE OR CONTRIBUTORS BE LIABLE 24c19800e8SDoug Rabson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25c19800e8SDoug Rabson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26c19800e8SDoug Rabson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27c19800e8SDoug Rabson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28c19800e8SDoug Rabson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29c19800e8SDoug Rabson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30c19800e8SDoug Rabson * SUCH DAMAGE. 31c19800e8SDoug Rabson */ 32c19800e8SDoug Rabson 33c19800e8SDoug Rabson #include "spnego/spnego_locl.h" 34c19800e8SDoug Rabson #include <gssapi_mech.h> 35c19800e8SDoug Rabson 36c19800e8SDoug Rabson RCSID("$Id: external.c 18336 2006-10-07 22:27:13Z lha $"); 37c19800e8SDoug Rabson 38c19800e8SDoug Rabson /* 39c19800e8SDoug Rabson * RFC2478, SPNEGO: 40c19800e8SDoug Rabson * The security mechanism of the initial 41c19800e8SDoug Rabson * negotiation token is identified by the Object Identifier 42c19800e8SDoug Rabson * iso.org.dod.internet.security.mechanism.snego (1.3.6.1.5.5.2). 43c19800e8SDoug Rabson */ 44c19800e8SDoug Rabson 45c19800e8SDoug Rabson static gssapi_mech_interface_desc spnego_mech = { 46c19800e8SDoug Rabson GMI_VERSION, 47c19800e8SDoug Rabson "spnego", 48c19800e8SDoug Rabson {6, (void *)"\x2b\x06\x01\x05\x05\x02"}, 49c19800e8SDoug Rabson _gss_spnego_acquire_cred, 50c19800e8SDoug Rabson _gss_spnego_release_cred, 51c19800e8SDoug Rabson _gss_spnego_init_sec_context, 52c19800e8SDoug Rabson _gss_spnego_accept_sec_context, 53c19800e8SDoug Rabson _gss_spnego_process_context_token, 54c19800e8SDoug Rabson _gss_spnego_internal_delete_sec_context, 55c19800e8SDoug Rabson _gss_spnego_context_time, 56c19800e8SDoug Rabson _gss_spnego_get_mic, 57c19800e8SDoug Rabson _gss_spnego_verify_mic, 58c19800e8SDoug Rabson _gss_spnego_wrap, 59c19800e8SDoug Rabson _gss_spnego_unwrap, 60c19800e8SDoug Rabson _gss_spnego_display_status, 61c19800e8SDoug Rabson NULL, 62c19800e8SDoug Rabson _gss_spnego_compare_name, 63c19800e8SDoug Rabson _gss_spnego_display_name, 64c19800e8SDoug Rabson _gss_spnego_import_name, 65c19800e8SDoug Rabson _gss_spnego_export_name, 66c19800e8SDoug Rabson _gss_spnego_release_name, 67c19800e8SDoug Rabson _gss_spnego_inquire_cred, 68c19800e8SDoug Rabson _gss_spnego_inquire_context, 69c19800e8SDoug Rabson _gss_spnego_wrap_size_limit, 70c19800e8SDoug Rabson _gss_spnego_add_cred, 71c19800e8SDoug Rabson _gss_spnego_inquire_cred_by_mech, 72c19800e8SDoug Rabson _gss_spnego_export_sec_context, 73c19800e8SDoug Rabson _gss_spnego_import_sec_context, 74c19800e8SDoug Rabson _gss_spnego_inquire_names_for_mech, 75c19800e8SDoug Rabson _gss_spnego_inquire_mechs_for_name, 76c19800e8SDoug Rabson _gss_spnego_canonicalize_name, 77c19800e8SDoug Rabson _gss_spnego_duplicate_name 78c19800e8SDoug Rabson }; 79c19800e8SDoug Rabson 80c19800e8SDoug Rabson gssapi_mech_interface 81c19800e8SDoug Rabson __gss_spnego_initialize(void) 82c19800e8SDoug Rabson { 83c19800e8SDoug Rabson return &spnego_mech; 84c19800e8SDoug Rabson } 85c19800e8SDoug Rabson 86c19800e8SDoug Rabson static gss_OID_desc _gss_spnego_mechanism_desc = 87c19800e8SDoug Rabson {6, (void *)"\x2b\x06\x01\x05\x05\x02"}; 88c19800e8SDoug Rabson 89c19800e8SDoug Rabson gss_OID GSS_SPNEGO_MECHANISM = &_gss_spnego_mechanism_desc; 90