1 /* gss-extra.h --- Provide GSS-API symbols when missing from library. 2 * Copyright (C) 2010-2021 Simon Josefsson 3 * 4 * This file is part of GNU SASL Library. 5 * 6 * GNU SASL Library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * GNU SASL Library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with GNU SASL Library; if not, write to the Free 18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef GSS_EXTRA_H 24 # define GSS_EXTRA_H 25 26 /* Get GSS-API functions. */ 27 #ifdef HAVE_LIBGSS 28 # include <gss.h> 29 #else 30 # if HAVE_GSSAPI_H 31 # include <gssapi.h> 32 # elif HAVE_GSSAPI_GSSAPI_H 33 # include <gssapi/gssapi.h> 34 # endif 35 # if HAVE_GSSAPI_GSSAPI_EXT_H 36 # include <gssapi/gssapi_ext.h> 37 # endif 38 #endif 39 40 #ifndef HAVE_GSS_OID_EQUAL 41 extern int gss_oid_equal (const gss_OID first_oid, const gss_OID second_oid); 42 #endif /* HAVE_GSS_OID_EQUAL */ 43 44 #ifndef HAVE_GSS_INQUIRE_MECH_FOR_SASLNAME 45 OM_uint32 46 gss_inquire_mech_for_saslname (OM_uint32 * minor_status, 47 const gss_buffer_t sasl_mech_name, 48 gss_OID * mech_type); 49 #endif /* HAVE_GSS_INQUIRE_MECH_FOR_SASLNAME */ 50 51 #ifndef HAVE_GSS_ENCAPSULATE_TOKEN 52 extern OM_uint32 53 gss_encapsulate_token (const gss_buffer_t input_token, 54 const gss_OID token_oid, gss_buffer_t output_token); 55 #endif /* HAVE_GSS_ENCAPSULATE_TOKEN */ 56 57 #ifndef HAVE_GSS_DECAPSULATE_TOKEN 58 OM_uint32 59 gss_decapsulate_token (const gss_buffer_t input_token, 60 const gss_OID token_oid, gss_buffer_t output_token); 61 #endif 62 63 #endif /* GSS_EXTRA_H */ 64