Eap channel bindings cleanup
[mech_eap.git] / mech_eap / util_radius.h
index ebd348b..8c34167 100644 (file)
@@ -39,6 +39,8 @@
 
 #ifdef __cplusplus
 
+#ifdef GSSEAP_ENABLE_ACCEPTOR
+
 struct gss_eap_radius_attr_provider : gss_eap_attr_provider {
 public:
     gss_eap_radius_attr_provider(void);
@@ -95,6 +97,10 @@ public:
                                 int *authenticated,
                                 int *complete,
                                 gss_buffer_t value) const;
+    bool getFragmentedAttribute(uint32_t attrid,
+                                int *authenticated,
+                                int *complete,
+                                gss_buffer_t value) const;
 
     bool authenticated(void) const { return m_authenticated; }
 
@@ -114,10 +120,14 @@ private:
     bool m_authenticated;
 };
 
+#endif /* GSSEAP_ENABLE_ACCEPTOR */
+
 /* For now */
 extern "C" {
 #endif
 
+#ifdef GSSEAP_ENABLE_ACCEPTOR
+
 OM_uint32
 gssEapRadiusAddAvp(OM_uint32 *minor,
                    VALUE_PAIR **vp,
@@ -150,6 +160,24 @@ OM_uint32
 gssEapRadiusMapError(OM_uint32 *minor,
                      struct rs_error *err);
 
+OM_uint32
+gssEapCreateRadiusContext(OM_uint32 *minor,
+                          gss_cred_id_t cred,
+                          struct rs_context **pRadContext);
+
+#endif /* GSSEAP_ENABLE_ACCEPTOR */
+
+/* initiator utilities that require only libeap, and not freeradius */
+struct wpabuf;
+
+OM_uint32
+gssEapRadiusAddAttr(OM_uint32 *minor,
+                    struct wpabuf **dst,
+                    uint16_t type,
+                    uint16_t vendor,
+                    gss_buffer_t value);
+
+/* This really needs to be a function call on Windows */
 #define RS_CONFIG_FILE      SYSCONFDIR "/radsec.conf"
 
 #define VENDORPEC_MS                        311 /* RFC 2548 */
@@ -164,9 +192,7 @@ gssEapRadiusMapError(OM_uint32 *minor,
 #define PW_GSS_ACCEPTOR_SERVICE_SPECIFIC    130
 #define PW_GSS_ACCEPTOR_REALM_NAME          131
 #define PW_SAML_AAA_ASSERTION               132
-
-#define IS_RADIUS_ERROR(code)               ((code) >= ERROR_TABLE_BASE_rse && \
-                                             (code) <= ERROR_TABLE_BASE_rse + RSE_TIMEOUT_IO)
+#define PW_MS_WINDOWS_AUTH_DATA             133
 
 #ifdef __cplusplus
 }