1178828Sdfr/*- 2178828Sdfr * Copyright (c) 2008 Doug Rabson 3178828Sdfr * All rights reserved. 4178828Sdfr * 5178828Sdfr * Redistribution and use in source and binary forms, with or without 6178828Sdfr * modification, are permitted provided that the following conditions 7178828Sdfr * are met: 8178828Sdfr * 1. Redistributions of source code must retain the above copyright 9178828Sdfr * notice, this list of conditions and the following disclaimer. 10178828Sdfr * 2. Redistributions in binary form must reproduce the above copyright 11178828Sdfr * notice, this list of conditions and the following disclaimer in the 12178828Sdfr * documentation and/or other materials provided with the distribution. 13178828Sdfr * 14178828Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15178828Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16178828Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17178828Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18178828Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19178828Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20178828Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21178828Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22178828Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23178828Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24178828Sdfr * SUCH DAMAGE. 25178828Sdfr * 26178828Sdfr * $FreeBSD: releng/11.0/kerberos5/lib/libgssapi_spnego/freebsd_compat.c 233294 2012-03-22 08:48:42Z stas $ 27178828Sdfr */ 28178828Sdfr 29178828Sdfr#include <gssapi/gssapi.h> 30233294Sstas#include <mech_switch.h> 31178828Sdfr 32233294Sstasgss_OID_desc __gss_c_nt_hostbased_service_oid_desc = 33233294Sstas {10, (void *)("\x2a\x86\x48\x86\xf7\x12" "\x01\x02\x01\x04")}; 34178828Sdfr 35178828Sdfrconst char * 36178828Sdfr_gss_name_prefix(void) 37178828Sdfr{ 38178828Sdfr return "_gss_spnego"; 39178828Sdfr} 40233294Sstas 41233294Sstasvoid 42233294Sstasgss_mg_collect_error(gss_OID mech, OM_uint32 maj, OM_uint32 min) 43233294Sstas{ 44233294Sstas _gss_mg_collect_error(mech, maj, min); 45233294Sstas} 46233294Sstas 47233294SstasOM_uint32 _gss_spnego_display_status 48233294Sstas (OM_uint32 * minor_status, 49233294Sstas OM_uint32 status_value, 50233294Sstas int status_type, 51233294Sstas const gss_OID mech_type, 52233294Sstas OM_uint32 * message_context, 53233294Sstas gss_buffer_t status_string 54233294Sstas ) 55233294Sstas{ 56233294Sstas return GSS_S_FAILURE; 57233294Sstas} 58233294Sstas 59233294SstasOM_uint32 _gss_spnego_add_cred ( 60233294Sstas OM_uint32 * minor_status, 61233294Sstas const gss_cred_id_t input_cred_handle, 62233294Sstas const gss_name_t desired_name, 63233294Sstas const gss_OID desired_mech, 64233294Sstas gss_cred_usage_t cred_usage, 65233294Sstas OM_uint32 initiator_time_req, 66233294Sstas OM_uint32 acceptor_time_req, 67233294Sstas gss_cred_id_t * output_cred_handle, 68233294Sstas gss_OID_set * actual_mechs, 69233294Sstas OM_uint32 * initiator_time_rec, 70233294Sstas OM_uint32 * acceptor_time_rec 71233294Sstas ) 72233294Sstas{ 73233294Sstas return gss_add_cred(minor_status, 74233294Sstas input_cred_handle, 75233294Sstas desired_name, 76233294Sstas desired_mech, 77233294Sstas cred_usage, 78233294Sstas initiator_time_req, 79233294Sstas acceptor_time_req, 80233294Sstas output_cred_handle, 81233294Sstas actual_mechs, 82233294Sstas initiator_time_rec, 83233294Sstas acceptor_time_rec); 84233294Sstas} 85