fix some build errors
[mech_eap.git] / gssapiP_eap.h
index 92cadac..2369f47 100644 (file)
@@ -36,6 +36,8 @@
 #include <assert.h>
 #include <string.h>
 #include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
 #include <time.h>
 
 /* GSS includes */
 #include "util.h"
 
 /* EAP includes */
-#define IEEE8021X_EAPOL 1
-
 #include <common.h>
 #include <eap_peer/eap.h>
 #include <eap_peer/eap_config.h>
+#include <crypto/tls.h>                     /* XXX testing implementation only */
 #include <wpabuf.h>
 
 /* Kerberos includes */
@@ -74,8 +75,8 @@ struct gss_name_struct {
     struct eap_gss_avp_list *avps;
 };
 
-#define CRED_FLAG_INITIATOR                 0x00000001
-#define CRED_FLAG_ACCEPTOR                  0x00000002
+#define CRED_FLAG_INITIAT                 0x00000001
+#define CRED_FLAG_ACCEPT                    0x00000002
 #define CRED_FLAG_DEFAULT_IDENTITY          0x00000004
 #define CRED_FLAG_PASSWORD                  0x00000008
 
@@ -84,6 +85,7 @@ struct gss_cred_id_struct {
     OM_uint32 flags;
     gss_name_t name;
     gss_buffer_desc password;
+    gss_OID_set mechanisms;
     time_t expiryTime;
 };
 
@@ -92,7 +94,7 @@ struct gss_cred_id_struct {
 #define CTX_IS_INITIATOR(ctx)               (((ctx)->flags & CTX_FLAG_INITIATOR) != 0)
 
 enum eap_gss_state {
-    EAP_STATE_AUTHENTICATE = 1,
+    EAP_STATE_AUTHENTICATE = 0,
     EAP_STATE_KEY_TRANSPORT,
     EAP_STATE_SECURE_ASSOCIATION,
     EAP_STATE_GSS_CHANNEL_BINDINGS,
@@ -113,14 +115,18 @@ enum eap_gss_state {
 #define CTX_FLAG_EAP_ALT_REJECT             0x01000000
 
 struct eap_gss_initiator_ctx {
-    struct wpabuf *eapReqData;
     unsigned int idleWhile;
-    struct eap_peer_config eapConfig;
+    struct eap_peer_config eapPeerConfig;
+    struct eap_config eapConfig;
     struct eap_sm *eap;
+    struct wpabuf reqData;
 };
 
-/* Acceptor context flags */
 struct eap_gss_acceptor_ctx {
+    struct eap_eapol_interface *eapPolInterface;
+    void *tlsContext;
+    struct eap_sm *eap;
+    struct eap_config eapConfig; /* XXX */
 };
 
 struct gss_ctx_id_struct {
@@ -130,7 +136,6 @@ struct gss_ctx_id_struct {
     OM_uint32 gssFlags;
     gss_OID mechanismUsed;
     krb5_enctype encryptionType;
-    krb5_cksumtype checksumType;
     krb5_keyblock rfc3961Key;
     gss_name_t initiatorName;
     gss_name_t acceptorName;