indicate_mechs.c revision 233294
167754Smsmith/* 267754Smsmith * Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska H��gskolan 377424Smsmith * (Royal Institute of Technology, Stockholm, Sweden). 467754Smsmith * All rights reserved. 567754Smsmith * 667754Smsmith * Redistribution and use in source and binary forms, with or without 7217365Sjkim * modification, are permitted provided that the following conditions 8306536Sjkim * are met: 970243Smsmith * 1067754Smsmith * 1. Redistributions of source code must retain the above copyright 11217365Sjkim * notice, this list of conditions and the following disclaimer. 12217365Sjkim * 13217365Sjkim * 2. Redistributions in binary form must reproduce the above copyright 14217365Sjkim * notice, this list of conditions and the following disclaimer in the 15217365Sjkim * documentation and/or other materials provided with the distribution. 16217365Sjkim * 17217365Sjkim * 3. Neither the name of the Institute nor the names of its contributors 18217365Sjkim * may be used to endorse or promote products derived from this software 19217365Sjkim * without specific prior written permission. 20217365Sjkim * 21217365Sjkim * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22217365Sjkim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23217365Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24217365Sjkim * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 2567754Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26217365Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27217365Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28217365Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2967754Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30217365Sjkim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31217365Sjkim * SUCH DAMAGE. 32217365Sjkim */ 33217365Sjkim 34217365Sjkim#include "gsskrb5_locl.h" 35217365Sjkim 36217365SjkimOM_uint32 GSSAPI_CALLCONV _gsskrb5_indicate_mechs 37217365Sjkim (OM_uint32 * minor_status, 38217365Sjkim gss_OID_set * mech_set 39217365Sjkim ) 40217365Sjkim{ 41217365Sjkim OM_uint32 ret, junk; 42217365Sjkim 4367754Smsmith ret = gss_create_empty_oid_set(minor_status, mech_set); 4477424Smsmith if (ret) 4577424Smsmith return ret; 4667754Smsmith 4767754Smsmith ret = gss_add_oid_set_member(minor_status, GSS_KRB5_MECHANISM, mech_set); 48167802Sjkim if (ret) { 49228110Sjkim gss_release_oid_set(&junk, mech_set); 50167802Sjkim return ret; 51167802Sjkim } 52167802Sjkim 53281075Sdim *minor_status = 0; 54167802Sjkim return GSS_S_COMPLETE; 55167802Sjkim} 56167802Sjkim