cleanup TLV code
[mech_eap.orig] / gssapiP_eap.h
index 290da74..752311e 100644 (file)
@@ -145,8 +145,9 @@ enum gss_eap_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
+    GSSEAP_STATE_REAUTHENTICATE = 0x10,     /* GSS reauthentication messages */
+    GSSEAP_STATE_ESTABLISHED    = 0x20,     /* context established */
+    GSSEAP_STATE_ALL            = 0x3F
 };
 
 #define GSSEAP_STATE_NEXT(s)    ((s) << 1)
@@ -156,8 +157,7 @@ struct gss_eap_sm {
     OM_uint32 inputTokenType;
     OM_uint32 outputTokenType;
     enum gss_eap_state validStates;
-    int critical;
-    int required;
+    OM_uint32 itokFlags;
     OM_uint32 (*processToken)(OM_uint32 *,
                               gss_cred_id_t,
                               gss_ctx_id_t,
@@ -171,9 +171,12 @@ struct gss_eap_sm {
                               OM_uint32 *);
 };
 
-#define SM_FLAG_TRANSITION                  0x00000001
-#define SM_FLAG_FORCE_SEND_TOKEN            0x00000002
-#define SM_FLAG_STOP_EVAL                   0x00000004
+#define SM_FLAG_TRANSITION                  0x00000001  /* transition to next state */
+#define SM_FLAG_FORCE_SEND_TOKEN            0x00000002  /* send token even if empty */
+#define SM_FLAG_STOP_EVAL                   0x00000004  /* no more handlers for this state */
+
+#define SM_ITOK_FLAG_CRITICAL               0x00000001  /* sent tokens marked critical */
+#define SM_ITOK_FLAG_REQUIRED               0x00000002  /* received tokens must be present */
 
 #define CTX_IS_ESTABLISHED(ctx)             ((ctx)->state == GSSEAP_STATE_ESTABLISHED)