projects
/
moonshot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build without RADIUS-related headers if no acceptor
[moonshot.git]
/
moonshot
/
mech_eap
/
gssapiP_eap.h
diff --git
a/moonshot/mech_eap/gssapiP_eap.h
b/moonshot/mech_eap/gssapiP_eap.h
index
d62738f
..
b141032
100644
(file)
--- a/
moonshot/mech_eap/gssapiP_eap.h
+++ b/
moonshot/mech_eap/gssapiP_eap.h
@@
-42,11
+42,19
@@
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <stdlib.h>
+#endif
+#ifdef HAVE_STDARG_H
#include <stdarg.h>
#include <stdarg.h>
+#endif
#include <time.h>
#include <time.h>
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#include <sys/param.h>
+#endif
/* GSS headers */
#include <gssapi/gssapi.h>
/* GSS headers */
#include <gssapi/gssapi.h>
@@
-66,6
+74,7
@@
typedef const gss_OID_desc *gss_const_OID;
#include <krb5.h>
/* EAP headers */
#include <krb5.h>
/* EAP headers */
+#include <includes.h>
#include <common.h>
#include <eap_peer/eap.h>
#include <eap_peer/eap_config.h>
#include <common.h>
#include <eap_peer/eap.h>
#include <eap_peer/eap_config.h>
@@
-74,6
+83,7
@@
typedef const gss_OID_desc *gss_const_OID;
#include <wpabuf.h>
/* FreeRADIUS headers */
#include <wpabuf.h>
/* FreeRADIUS headers */
+#ifdef GSSEAP_ENABLE_ACCEPTOR
#ifdef __cplusplus
extern "C" {
#define operator fr_operator
#ifdef __cplusplus
extern "C" {
#define operator fr_operator
@@
-86,6
+96,7
@@
extern "C" {
#undef operator
}
#endif
#undef operator
}
#endif
+#endif /* GSSEAP_ENABLE_ACCEPTOR */
#include "gsseap_err.h"
#include "radsec_err.h"
#include "gsseap_err.h"
#include "radsec_err.h"
@@
-113,7
+124,9
@@
struct gss_name_struct
OM_uint32 flags;
gss_OID mechanismUsed; /* this is immutable */
krb5_principal krbPrincipal; /* this is immutable */
OM_uint32 flags;
gss_OID mechanismUsed; /* this is immutable */
krb5_principal krbPrincipal; /* this is immutable */
+#ifdef GSSEAP_ENABLE_ACCEPTOR
struct gss_eap_attr_ctx *attrCtx;
struct gss_eap_attr_ctx *attrCtx;
+#endif
};
#define CRED_FLAG_INITIATE 0x00010000
};
#define CRED_FLAG_INITIATE 0x00010000
@@
-173,6
+186,7
@@
struct gss_eap_initiator_ctx {
struct wpabuf reqData;
};
struct wpabuf reqData;
};
+#ifdef GSSEAP_ENABLE_ACCEPTOR
struct gss_eap_acceptor_ctx {
struct rs_context *radContext;
struct rs_connection *radConn;
struct gss_eap_acceptor_ctx {
struct rs_context *radContext;
struct rs_connection *radConn;
@@
-180,6
+194,7
@@
struct gss_eap_acceptor_ctx {
gss_buffer_desc state;
VALUE_PAIR *vps;
};
gss_buffer_desc state;
VALUE_PAIR *vps;
};
+#endif
#ifdef HAVE_HEIMDAL_VERSION
struct gss_ctx_id_t_desc_struct
#ifdef HAVE_HEIMDAL_VERSION
struct gss_ctx_id_t_desc_struct
@@
-204,8
+219,10
@@
struct gss_ctx_id_struct
union {
struct gss_eap_initiator_ctx initiator;
#define initiatorCtx ctxU.initiator
union {
struct gss_eap_initiator_ctx initiator;
#define initiatorCtx ctxU.initiator
+#ifdef GSSEAP_ENABLE_ACCEPTOR
struct gss_eap_acceptor_ctx acceptor;
#define acceptorCtx ctxU.acceptor
struct gss_eap_acceptor_ctx acceptor;
#define acceptorCtx ctxU.acceptor
+#endif
#ifdef GSSEAP_ENABLE_REAUTH
gss_ctx_id_t reauth;
#define reauthCtx ctxU.reauth
#ifdef GSSEAP_ENABLE_REAUTH
gss_ctx_id_t reauth;
#define reauthCtx ctxU.reauth
@@
-300,6
+317,10
@@
gssEapSaveStatusInfo(OM_uint32 minor, const char *format, ...);
#define IS_WIRE_ERROR(err) ((err) > GSSEAP_RESERVED && \
(err) <= GSSEAP_RADIUS_PROT_FAILURE)
#define IS_WIRE_ERROR(err) ((err) > GSSEAP_RESERVED && \
(err) <= GSSEAP_RADIUS_PROT_FAILURE)
+/* upper bound of RADIUS error range must be kept in sync with radsec.h */
+#define IS_RADIUS_ERROR(err) ((err) >= ERROR_TABLE_BASE_rse && \
+ (err) <= ERROR_TABLE_BASE_rse + 20)
+
/* export_sec_context.c */
OM_uint32
gssEapExportSecContext(OM_uint32 *minor,
/* export_sec_context.c */
OM_uint32
gssEapExportSecContext(OM_uint32 *minor,