libeap is now C++ clean, remove workaround
[moonshot.git] / mech_eap / gssapiP_eap.h
index 22f85b5..0d1dd4d 100644 (file)
@@ -51,7 +51,9 @@
 /* GSS headers */
 #include <gssapi/gssapi.h>
 #include <gssapi/gssapi_krb5.h>
-#ifndef HAVE_HEIMDAL_VERSION
+#ifdef HAVE_HEIMDAL_VERSION
+typedef struct gss_any *gss_any_t;
+#else
 #include <gssapi/gssapi_ext.h>
 #endif
 #include "gssapi_eap.h"
@@ -105,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;
 };
@@ -158,11 +161,9 @@ struct gss_cred_id_struct
 
 struct gss_eap_initiator_ctx {
     unsigned int idleWhile;
-#ifndef __cplusplus
     struct eap_peer_config eapPeerConfig;
     struct eap_sm *eap;
     struct wpabuf reqData;
-#endif
 };
 
 struct gss_eap_acceptor_ctx {
@@ -199,8 +200,8 @@ struct gss_ctx_id_struct
         struct gss_eap_acceptor_ctx  acceptor;
         #define acceptorCtx          ctxU.acceptor
 #ifdef GSSEAP_ENABLE_REAUTH
-        gss_ctx_id_t                 kerberos;
-        #define kerberosCtx          ctxU.kerberos
+        gss_ctx_id_t                 reauth;
+        #define reauthCtx            ctxU.reauth
 #endif
     } ctxU;
     gss_buffer_desc conversation;
@@ -261,6 +262,13 @@ gssEapSaveStatusInfo(OM_uint32 minor, const char *format, ...);
 #define IS_WIRE_ERROR(err)              ((err) > GSSEAP_RESERVED && \
                                          (err) <= GSSEAP_RADIUS_PROT_FAILURE)
 
+/* export_sec_context.c */
+OM_uint32
+gssEapExportSecContext(OM_uint32 *minor,
+                       gss_ctx_id_t ctx,
+                       gss_buffer_t token);
+
+
 #ifdef __cplusplus
 }
 #endif