X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=util.h;h=5687d527d6ed75bc9cd2804e321854e84b41867b;hb=refs%2Fheads%2Fjson-name;hp=e6c08ef16d251d4d97b0b9c43dc15765c9650d12;hpb=d3401e115b8adde974567ec4577a88658fb895e5;p=mech_eap.orig diff --git a/util.h b/util.h index e6c08ef..5687d52 100644 --- a/util.h +++ b/util.h @@ -75,6 +75,12 @@ extern "C" { #define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) #endif +#if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +#define GSSEAP_UNUSED __attribute__ ((__unused__)) +#else +#define GSSEAP_UNUSED +#endif + /* util_buffer.c */ OM_uint32 makeStringBuffer(OM_uint32 *minor, @@ -199,12 +205,6 @@ gssEapContextTime(OM_uint32 *minor, gss_ctx_id_t context_handle, OM_uint32 *time_rec); -OM_uint32 -gssEapDisplayName(OM_uint32 *minor, - gss_name_t name, - gss_buffer_t output_name_buffer, - gss_OID *output_name_type); - /* util_cred.c */ OM_uint32 gssEapAllocCred(OM_uint32 *minor, gss_cred_id_t *pCred); OM_uint32 gssEapReleaseCred(OM_uint32 *minor, gss_cred_id_t *pCred); @@ -404,9 +404,16 @@ gssEapExportLucidSecContext(OM_uint32 *minor, /* util_mech.c */ extern gss_OID GSS_EAP_MECHANISM; -int -gssEapInternalizeOid(const gss_OID oid, - gss_OID *const pInternalizedOid); +#define OID_FLAG_NULL_VALID 0x00000001 +#define OID_FLAG_FAMILY_MECH_VALID 0x00000002 +#define OID_FLAG_MAP_NULL_TO_DEFAULT_MECH 0x00000004 +#define OID_FLAG_MAP_FAMILY_MECH_TO_NULL 0x00000008 + +OM_uint32 +gssEapCanonicalizeOid(OM_uint32 *minor, + const gss_OID oid, + OM_uint32 flags, + gss_OID *pOid); OM_uint32 gssEapReleaseOid(OM_uint32 *minor, gss_OID *oid); @@ -460,7 +467,8 @@ OM_uint32 gssEapExportNameInternal(OM_uint32 *minor, unsigned int flags); OM_uint32 gssEapImportName(OM_uint32 *minor, const gss_buffer_t input_name_buffer, - gss_OID input_name_type, + const gss_OID input_name_type, + const gss_OID input_mech_type, gss_name_t *output_name); OM_uint32 gssEapImportNameInternal(OM_uint32 *minor, const gss_buffer_t input_name_buffer, @@ -471,6 +479,24 @@ gssEapDuplicateName(OM_uint32 *minor, const gss_name_t input_name, gss_name_t *dest_name); +OM_uint32 +gssEapCanonicalizeName(OM_uint32 *minor, + const gss_name_t input_name, + const gss_OID mech_type, + gss_name_t *dest_name); + +OM_uint32 +gssEapDisplayName(OM_uint32 *minor, + gss_name_t name, + gss_buffer_t output_name_buffer, + gss_OID *output_name_type); + +OM_uint32 +gssEapCompareName(OM_uint32 *minor, + gss_name_t name1, + gss_name_t name2, + int *name_equal); + /* util_oid.c */ OM_uint32 composeOid(OM_uint32 *minor_status, @@ -819,7 +845,9 @@ gssBufferToKrbData(gss_buffer_t buffer, krb5_data *data) } #endif +#include "util_json.h" #include "util_attr.h" +#include "util_base64.h" #ifdef GSSEAP_ENABLE_REAUTH #include "util_reauth.h" #endif