use GSSEAP_ASSERT macro instead of assert
[moonshot.git] / moonshot / mech_eap / util.h
index 1ebc452..7fa3495 100644 (file)
@@ -210,7 +210,10 @@ enum gss_eap_token_type {
 
 #define ITOK_TYPE_MASK                  (~(ITOK_FLAG_CRITICAL | ITOK_FLAG_VERIFIED))
 
-#define GSSEAP_WIRE_FLAGS_MASK          GSS_C_MUTUAL_FLAG
+#define GSSEAP_WIRE_FLAGS_MASK          ( GSS_C_MUTUAL_FLAG             | \
+                                          GSS_C_DCE_STYLE               | \
+                                          GSS_C_IDENTIFY_FLAG           | \
+                                          GSS_C_EXTENDED_ERROR_FLAG       )
 
 OM_uint32 gssEapAllocContext(OM_uint32 *minor, gss_ctx_id_t *pCtx);
 OM_uint32 gssEapReleaseContext(OM_uint32 *minor, gss_ctx_id_t *pCtx);
@@ -758,6 +761,11 @@ verifyTokenHeader(OM_uint32 *minor,
 #define GSSAPI_CALLCONV                 KRB5_CALLCONV
 #endif
 
+#ifndef GSSEAP_ASSERT
+#include <assert.h>
+#define GSSEAP_ASSERT(x)                assert((x))
+#endif /* !GSSEAP_ASSERT */
+
 #ifdef WIN32
 #define GSSEAP_CONSTRUCTOR
 #define GSSEAP_DESTRUCTOR
@@ -767,7 +775,7 @@ verifyTokenHeader(OM_uint32 *minor,
 #endif
 
 #define GSSEAP_NOT_IMPLEMENTED          do {            \
-        assert(0 && "not implemented");                 \
+        GSSEAP_ASSERT(0 && "not implemented");          \
         *minor = ENOSYS;                                \
         return GSS_S_FAILURE;                           \
     } while (0)