X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=gssapiP_eap.h;h=81fcf3f686b95a3c574df240eb74345938e8190b;hb=refs%2Fheads%2Fjson-name;hp=290da748e27ec6ea5609006ffcedb3f3e8d49e76;hpb=2ad2836d1c8e4e158a7f042c49320a25a06ca288;p=mech_eap.orig diff --git a/gssapiP_eap.h b/gssapiP_eap.h index 290da74..81fcf3f 100644 --- a/gssapiP_eap.h +++ b/gssapiP_eap.h @@ -44,13 +44,16 @@ #include #include #include +#include #include #include /* GSS headers */ #include #include -#ifndef HAVE_HEIMDAL_VERSION +#ifdef HAVE_HEIMDAL_VERSION +typedef struct gss_any *gss_any_t; +#else #include #endif #include "gssapi_eap.h" @@ -104,6 +107,7 @@ struct gss_name_struct { GSSEAP_MUTEX mutex; /* mutex protects attrCtx */ OM_uint32 flags; + gss_OID mechanismUsed; /* this is immutable */ krb5_principal krbPrincipal; /* this is immutable */ struct gss_eap_attr_ctx *attrCtx; }; @@ -140,41 +144,6 @@ struct gss_cred_id_struct #define CTX_IS_INITIATOR(ctx) (((ctx)->flags & CTX_FLAG_INITIATOR) != 0) -enum gss_eap_state { - GSSEAP_STATE_INITIAL = 0x01, /* initial state */ - GSSEAP_STATE_AUTHENTICATE = 0x02, /* exchange EAP messages */ - GSSEAP_STATE_INITIATOR_EXTS = 0x04, /* initiator extensions */ - GSSEAP_STATE_ACCEPTOR_EXTS = 0x08, /* acceptor extensions */ - GSSEAP_STATE_ESTABLISHED = 0x10, /* context established */ - GSSEAP_STATE_ALL = 0x1F -}; - -#define GSSEAP_STATE_NEXT(s) ((s) << 1) - -/* state machine entry */ -struct gss_eap_sm { - OM_uint32 inputTokenType; - OM_uint32 outputTokenType; - enum gss_eap_state validStates; - int critical; - int required; - OM_uint32 (*processToken)(OM_uint32 *, - gss_cred_id_t, - gss_ctx_id_t, - gss_name_t, - gss_OID, - OM_uint32, - OM_uint32, - gss_channel_bindings_t, - gss_buffer_t, - gss_buffer_t, - OM_uint32 *); -}; - -#define SM_FLAG_TRANSITION 0x00000001 -#define SM_FLAG_FORCE_SEND_TOKEN 0x00000002 -#define SM_FLAG_STOP_EVAL 0x00000004 - #define CTX_IS_ESTABLISHED(ctx) ((ctx)->state == GSSEAP_STATE_ESTABLISHED) /* Initiator context flags */