Support for libradius
[mech_eap.orig] / gssapiP_eap.h
index 31c4753..eef4206 100644 (file)
@@ -33,8 +33,6 @@
 #ifndef _GSSAPIP_EAP_H_
 #define _GSSAPIP_EAP_H_ 1
 
-#define BUILTIN_EAP 1
-
 #include <assert.h>
 #include <string.h>
 #include <errno.h>
 #include <common.h>
 #include <eap_peer/eap.h>
 #include <eap_peer/eap_config.h>
-#include <crypto/tls.h>                     /* XXX testing implementation only */
+#include <crypto/tls.h>
 #include <wpabuf.h>
 #endif
 
+#ifdef __cplusplus
+struct rc_conf;
+typedef struct rc_conf rc_handle;
+
+struct value_pair;
+typedef struct value_pair VALUE_PAIR;
+#else
+#include <freeradius-client.h>
+#include <freeradius/radius.h>
+#endif
+
+/* These name flags are informative and not actually used by anything yet */
 #define NAME_FLAG_NAI                       0x00000001
 #define NAME_FLAG_SERVICE                   0x00000002
-
-#define NAME_HAS_ATTRIBUTES(name)           ((name)->attrCtx != NULL)
+#define NAME_FLAG_COMPOSITE                 0x00000004
 
 struct gss_eap_saml_attr_ctx;
 struct gss_eap_attr_ctx;
 
 struct gss_name_struct {
-    GSSEAP_MUTEX mutex; /* mutex protecting attributes */
+    GSSEAP_MUTEX mutex; /* mutex protects attrCtx */
     OM_uint32 flags;
     krb5_principal krbPrincipal; /* this is immutable */
     struct gss_eap_attr_ctx *attrCtx;
@@ -127,11 +136,8 @@ struct gss_eap_initiator_ctx {
 };
 
 struct gss_eap_acceptor_ctx {
-#if defined(BUILTIN_EAP) && !defined(__cplusplus)
-    struct eap_eapol_interface *eapPolInterface;
-    void *tlsContext;
-    struct eap_sm *eap;
-#endif
+    rc_handle *radHandle;
+    VALUE_PAIR *avps;
 };
 
 struct gss_ctx_id_struct {